-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-overrides.js
51 lines (49 loc) · 1.22 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
50
51
const {
override,
disableEsLint,
overrideDevServer,
watchAll,
addWebpackModuleRule,
addWebpackAlias
} = require("customize-cra");
const path = require('path');
const rewiredMap = () => config => {
config.devtool = config.mode === 'development' ? 'cheap-module-source-map' : false;
return config;
};
module.exports = {
webpack: override(
rewiredMap(),
// usual webpack plugin
disableEsLint(),
addWebpackAlias({
'@': path.resolve(__dirname, './src')
}),
addWebpackModuleRule({
test: /\.worker\.js$/,
use: { loader: 'worker-loader' }
}),
addWebpackModuleRule({
test: /\.(asset)$/i,
use: [
{
loader: 'file-loader',
},
],
})
),
devServer: overrideDevServer(
(config) => {
config.proxy = {
'/ws': {
target: 'http://10.10.107.253:8080',
changeOrigin: true,
ws: true,
}
};
config.host = '0.0.0.0';
config.port = 3003;
return config;
}
)
};