From 0d23c25920f89682cebc2203fbfe444639fc67eb Mon Sep 17 00:00:00 2001 From: FairyEver <1711467488@qq.com> Date: Fri, 13 Dec 2019 08:31:26 +0800 Subject: [PATCH] analyzer --- vue.config.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vue.config.js b/vue.config.js index 7a4bf69b..338af185 100644 --- a/vue.config.js +++ b/vue.config.js @@ -116,9 +116,11 @@ module.exports = { .end() } // 分析工具 - config - .plugin('webpack-bundle-analyzer') - .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) + if (process.env.npm_config_report) { + config + .plugin('webpack-bundle-analyzer') + .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) + } }, // 不输出 map 文件 productionSourceMap: false,