mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:05:25 +00:00
split chunks
This commit is contained in:
parent
92ebb25fba
commit
128679e0a5
@ -54,16 +54,33 @@ module.exports = {
|
|||||||
config.optimization = {
|
config.optimization = {
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
chunks: "all",
|
chunks: "all",
|
||||||
|
minSize: 20000,
|
||||||
|
minChunks: 1,
|
||||||
|
maxAsyncRequests: 30,
|
||||||
|
maxInitialRequests: 30,
|
||||||
|
enforceSizeThreshold: 50000,
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
echarts: {
|
echarts: {
|
||||||
name: "echarts",
|
name: "echarts",
|
||||||
test: /[\\/]node_modules[\\/]echarts[\\/]/,
|
test: /[\\/]node_modules[\\/]echarts|zrender[\\/]/,
|
||||||
priority: 20,
|
priority: 30,
|
||||||
},
|
},
|
||||||
elementPlus: {
|
elementPlus: {
|
||||||
name: "element-plus",
|
name: "element-plus",
|
||||||
test: /[\\/]node_modules[\\/]element-plus[\\/]/,
|
test: /[\\/]node_modules[\\/]element-plus|@element-plus[\\/]/,
|
||||||
priority: 19,
|
priority: 10,
|
||||||
|
},
|
||||||
|
defaultVendors: {
|
||||||
|
name: "chunk-vendors",
|
||||||
|
test: /[\\/]node_modules[\\/]/,
|
||||||
|
priority: -10,
|
||||||
|
chunks: "async",
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
name: "chunk-commons",
|
||||||
|
minSize: 0,
|
||||||
|
minChunks: 2,
|
||||||
|
priority: -20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user