lrf402788946 4 éve
szülő
commit
a2bbaa3721
1 módosított fájl, 12 hozzáadás és 2 törlés
  1. 12 2
      vue.config.js

+ 12 - 2
vue.config.js

@@ -4,10 +4,20 @@ const school = path.resolve(__dirname, '../train-school');
 module.exports = {
   publicPath: process.env.NODE_ENV === 'development' ? '/' : '/center',
   outputDir: 'center',
+  productionSourceMap: false,
+  chainWebpack: config => {
+    if (process.env.NODE_ENV === 'production') {
+      config
+        .plugin('webpack-bundle-analyzer')
+        .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
+        .end();
+      config.plugins.delete('prefetch');
+    }
+  },
   configureWebpack: {
     // externals: {
-    //   'element-ui': 'Element',
-    //   vue: 'Vue',
+    //   // 'element-ui': 'Element',
+    //   // vue: 'Vue',
     // },
     // 开发生产共同配置
     resolve: {