Skip to content

Commit

Permalink
perf: 调整打包
Browse files Browse the repository at this point in the history
  • Loading branch information
刀刀 committed Jun 21, 2020
1 parent e8edab2 commit b6bb5c1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,31 @@ module.exports = {
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
vue: {
name: 'chunk-vue', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?vue(.*)/ // in order to adapt to cnpm
},
lodash: {
name: 'chunk-lodash', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?lodash(.*)/ // in order to adapt to cnpm
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
codeMirror: {
name: 'chunk-codeMirror', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?codemirror(.*)/ // in order to adapt to cnpm
},
antv: {
name: 'chunk-antv', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?@antv(.*)/ // in order to adapt to cnpm
},
jsonEditor: {
name: 'chunk-jsonEditor', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
Expand Down

0 comments on commit b6bb5c1

Please sign in to comment.