forked from 1azy-guy/CoolSwap-interface
-
Notifications
You must be signed in to change notification settings - Fork 1
/
craco.config.js
24 lines (24 loc) · 978 Bytes
/
craco.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module.exports = {
webpack: {
configure: (webpackConfig, { env, paths }) => {
// Exclude source map processing for problematic modules
// webpackConfig.module.rules.forEach((rule) => {
// if (String(rule.test) === String(/\.(js|mjs|jsx|ts|tsx)$/)) {
// // Exclude specific modules from source map processing
// rule.exclude = [/node_modules\/walletlink\//, /node_modules\/xhr2-cookies\//];
// }
// });
webpackConfig.resolve.fallback = {
...webpackConfig.resolve.fallback, // if you already have some fallbacks
"stream": require.resolve("stream-browserify"),
"assert": require.resolve("assert"),
"util": require.resolve("util"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
"os": require.resolve("os-browserify/browser")
// other fallbacks you want to add
};
return webpackConfig;
},
},
};