forked from Mirror-Protocol/terra-web-app
-
Notifications
You must be signed in to change notification settings - Fork 53
/
config-overrides.js
49 lines (46 loc) · 1.05 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
48
49
/* config-overrides.js */
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
module.exports = function override(config, env) {
// let loaders = config.resolve;
// loaders.fallback = {
// stream: require.resolve("stream-browserify"),
// buffer: require.resolve("buffer"),
// };
config.resolve = {
...config.resolve,
modules: ["node_modules", "src"],
extensions: [".js", ".json", ".jsx", ".css", ".sass", ".ts", ".tsx"],
};
config.plugins.push(
new NodePolyfillPlugin({
excludeAliases: [
"assert",
"buffer",
"console",
"constants",
"crypto",
"domain",
"events",
"http",
"https",
"os",
"path",
"punycode",
"querystring",
"_stream_duplex",
"_stream_passthrough",
"_stream_transform",
"_stream_writable",
"string_decoder",
"sys",
"timers",
"tty",
"url",
"util",
"vm",
"zlib",
],
})
);
return config;
};