Ver código fonte

improve: 打包插件

From-wh 2 anos atrás
pai
commit
a92cc3a872
2 arquivos alterados com 1 adições e 5 exclusões
  1. 0 1
      template/admin/src/App.vue
  2. 1 4
      template/admin/vue.config.js

+ 0 - 1
template/admin/src/App.vue

@@ -71,7 +71,6 @@ export default {
       }
     },
     getVersion() {
-      console.log(this.$route, 'this.$route.path', `${setting.routePre}/login`);
       this.isVersion = false;
       if (this.$route.path !== `${setting.routePre}/login` && this.$route.path !== '/') {
         if ((Local.get('version') && Local.get('version') !== config.version) || !Local.get('version'))

+ 1 - 4
template/admin/vue.config.js

@@ -37,10 +37,8 @@ module.exports = {
   // 如果你不需要使用eslint,把lintOnSave设为false即可
   lintOnSave: false,
   // 打包优化
-  // 打包优化
   configureWebpack: (config) => {
-    const pluginsPro = [new BundleAnalyzerPlugin()];
-
+    const pluginsPro = [];
     pluginsPro.push(
       // js文件压缩
       new UglifyJsPlugin({
@@ -55,7 +53,6 @@ module.exports = {
         parallel: true, //使用多进程并行运行来提高构建速度。默认并发运行数:os.cpus().length - 1。
       }),
     );
-
     if (process.env.NODE_ENV === 'production') {
       config.plugins = [...config.plugins, ...pluginsPro];
     }