wangziqian 5 年 前
コミット
860d797333
1 ファイル変更6 行追加5 行削除
  1. 6 5
      vue.config.js

+ 6 - 5
vue.config.js

@@ -112,11 +112,12 @@ module.exports = {
                 libs: {
                   name: 'chunk-libs',
                   test: /[\\/]node_modules[\\/]/,
-                  priority: -10
+                  priority: -10,
+                  chunks: 'initial' // only package third parties that are initially dependent
                 },
                 elementUI: {
                   name: 'chunk-elementUI', // split elementUI into a single package
-                  priority: 3, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+                  priority: 15, // 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
                   chunks: 'initial',
                   reuseExistingChunk: true,
@@ -126,7 +127,7 @@ module.exports = {
                   name: 'chunk-ant-design-vue',
                   test: /[\\/]node_modules[\\/]ant-design-vue[\\/]/,
                   chunks: 'initial',
-                  priority: 3,
+                  priority: 14,
                   reuseExistingChunk: true,
                   enforce: true
                 },
@@ -134,7 +135,7 @@ module.exports = {
                   name: 'chunk-echarts',
                   test: /[\\/]node_modules[\\/]echarts[\\/]/,
                   chunks: 'initial',
-                  priority: 3,
+                  priority: 13,
                   reuseExistingChunk: true,
                   enforce: true
                 },
@@ -142,7 +143,7 @@ module.exports = {
                   name: 'chunk-tinymce',
                   test: /[\\/]node_modules[\\/]tinymce[\\/]/,
                   chunks: 'initial',
-                  priority: 3,
+                  priority: 12,
                   reuseExistingChunk: true,
                   enforce: true
                 },