-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcraco.config.js
More file actions
50 lines (48 loc) · 1.47 KB
/
craco.config.js
File metadata and controls
50 lines (48 loc) · 1.47 KB
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
function devServerConfig(config) {
const proxyTarget = process.env.REACT_APP_MAINNET ? 'api' : 'rc';
return {
...config,
https: true,
host: 'local.deepmine.world',
proxy: {
'/ubs': {
// target: 'http://localhost:3001',
target: `https://${proxyTarget}.deepmine.world`,
changeOrigin: true,
withCredentials: true,
},
'/statistic': {
target: `https://${proxyTarget}.deepmine.world`,
changeOrigin: true,
withCredentials: true,
},
'/config': {
target: `https://${proxyTarget}.deepmine.world`,
changeOrigin: true,
withCredentials: true,
},
'/rent-market-api': {
target: `https://${proxyTarget}.deepmine.world`,
changeOrigin: true,
withCredentials: true,
},
'/game-api': {
target: `https://${proxyTarget}.deepmine.world`,
changeOrigin: true,
withCredentials: true,
},
},
};
}
function ignoreSourceMapWarnings(config) {
config.ignoreWarnings = [/Failed to parse source map/];
return config;
}
module.exports = {
devServer: (config) => devServerConfig(config),
webpack: {
configure: {
ignoreWarnings: [ignoreSourceMapWarnings],
},
},
};