generated from thirdweb-example/cra-javascript-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
47 lines (45 loc) · 1.08 KB
/
config-overrides.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const webpack = require("webpack");
module.exports = function override(config) {
const fallback = config.resolve.fallback || {};
config.resolve.fallback = {
...fallback,
http: false,
https: false,
zlib: false,
url: false
};
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
]);
config.resolve.extensions.push(".mjs");
config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
});
return {
...config,
// This is needed to not show the warning about this modules don't have src files, only on dist (build)
ignoreWarnings: [
{
module: /node_modules\/@walletconnect/,
},
{
module: /node_modules\/eth-rpc-errors/,
},
{
module: /node_modules\/json-rpc-engine/,
},
{
module: /node_modules\/@metamask/,
},
{
module: /node_modules\/@gnosis.pm/,
},
],
};
};