-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-overrides.js
38 lines (37 loc) · 1.12 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
const { ProvidePlugin } = require('webpack');
module.exports = function (config, env) {
return {
...config,
module: {
...config.module,
rules: [
...config.module.rules,
{
test: /\.m?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
},
plugins: [
...config.plugins,
new ProvidePlugin({
process: 'process/browser',
Buffer: ["buffer", "Buffer"],
}),
],
resolve: {
...config.resolve,
fallback: {
assert: require.resolve('assert'),
buffer: require.resolve('buffer'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
zlib: require.resolve('browserify-zlib'),
path: require.resolve('path-browserify'),
},
},
ignoreWarnings: [/Failed to parse source map/],
};
};