-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
34 lines (33 loc) · 963 Bytes
/
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
const { ProvidePlugin } = require('webpack');
module.exports = function (config, env) {
return {
...config,
module: {
...config.module,
rules: [
...config.module.rules,
{
test: /\.(m?js|ts)$/,
enforce: 'pre',
use: ['source-map-loader'],
},
],
},
plugins: [
...config.plugins,
new ProvidePlugin({
process: 'process/browser',
}),
],
resolve: {
...config.resolve,
fallback: {
assert: require.resolve('assert'),
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify'),
crypto: require.resolve('crypto-browserify'),
},
},
ignoreWarnings: [/Failed to parse source map/],
};
};