-
Notifications
You must be signed in to change notification settings - Fork 4
/
config-overrides.js
37 lines (36 loc) · 996 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
35
36
37
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'],
},
],
},
devServer: {
inline: false,
contentBase: "./dist",
},
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'),
},
},
ignoreWarnings: [/Failed to parse source map/],
};
};