nuxt.js项目打包后vendor.js过大怎么处理 ?????
3 回答
慕粉21210115
TA贡献1条经验 获得超0个赞
nuxt.config.js 在build中添加
build:{
optimization: {
splitChunks: {
chunks: 'all',
automaticNameDelimiter: '.',
maxAsyncRequests: 7,
cacheGroups: {
vuetify: {
test: /node_modules[\\/]vuetify/,
chunks: 'all',
priority: 20,
name: true
},
elementui: {
test: /node_modules[\\/]element-ui/,
chunks: 'all',
priority: 20,
name: true
}
}
}
}
}添加回答
举报
0/150
提交
取消
