-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.umirc.js
92 lines (91 loc) · 2.29 KB
/
.umirc.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
export default {
history: 'hash',
chainWebpack(config) {
config.module
.rule('exclude')
.use('url-loader')
.tap(options => {
return {
...options,
limit: 4096,
};
});
config.optimization.splitChunks({
chunks: 'async',
minSize: 30000,
maxSize: 0,
minChunks: 1,
maxAsyncRequests: 20,
maxInitialRequests: 20,
automaticNameDelimiter: '~',
name: true,
cacheGroups: {
vendors: {
name: 'vendors',
chunks: 'all',
test: /[\\/]node_modules[\\/](react|react-dom|react-router|react-router-dom|lodash|lodash-decorators|redux-saga|re-select|dva|moment)[\\/]/,
priority: -10,
},
antdesigns: {
name: 'antdesigns',
chunks: 'all',
test: /[\\/]node_modules[\\/](@ant-design|antd)[\\/]/,
priority: -10,
},
ethers: {
name: 'ethers',
chunks: 'all',
test: /[\\/]node_modules[\\/](ethers-wan)[\\/]/,
priority: -11,
},
charts: {
name: 'charts',
chunks: 'all',
test: /[\\/]node_modules[\\/](bizcharts)[\\/]/,
priority: -11,
},
antv: {
name: 'antv',
chunks: 'all',
test: /[\\/]node_modules[\\/](@antv)[\\/]/,
priority: -11,
},
idna: {
name: 'idna',
chunks: 'all',
test: /[\\/]node_modules[\\/](idna-uts46-hx)[\\/]/,
priority: -11,
},
walletsdk: {
name: 'walletsdk',
chunks: 'all',
test: /[\\/]node_modules[\\/](wan-dex-sdk-wallet)[\\/]/,
priority: -11,
},
mimedb: {
name: 'mimedb',
chunks: 'all',
test: /[\\/]node_modules[\\/](mime-db)[\\/]/,
priority: -11,
},
psl: {
name: 'psl',
chunks: 'all',
test: /[\\/]node_modules[\\/](psl)[\\/]/,
priority: -11,
},
},
});
},
plugins: [
[
"umi-plugin-react",
{
dva: false,
antd: true,
chunks: ['vendors', 'antdesigns', 'ethers', 'charts', 'antv', 'idna', 'walletsdk', 'mimedb', 'psl', 'umi']
}
],
"./umi-plugin-entry.js"
],
};