This repository was archived by the owner on Jun 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 209
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Widget doesn't work at all with React #634
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description & Stps to reprouce
Done everything to insert the widget in the docs on a plain React App.
When you then start the React App you get the following error:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
After trying multiple steps to somehow get it working, after installing craco and adding a webpack config:
const webpack = require("webpack");
module.exports = {
webpack: {
configure: (webpackConfig) => {
webpackConfig.module.rules.forEach((rule) => {
if (rule.use) {
rule.use.forEach((loader) => {
if (loader.loader === "source-map-loader") {
loader.exclude = [
/node_modules\/jsbi/,
/node_modules\/node-vibrant/,
];
}
});
}
});
webpackConfig.resolve.fallback = {
assert: require.resolve("assert/"),
http: require.resolve("stream-http"),
https: require.resolve("https-browserify"),
path: require.resolve("path-browserify"),
fs: false,
};
webpackConfig.plugins.push(
new webpack.ProvidePlugin({
process: "process/browser",
})
);
return webpackConfig;
},
},
};
We still get errors and the localhost shows us that nothing can be fetched for example the Tokenlist
Additional Context
It also doesnt work with next with very similar errors, and downgrading doesnt work either
sarevok89, T-Damer, mingyuanlee and 1940879828
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working