Skip to content

Commit

Permalink
fix: 修复当build结果存在 warning 就不自动弹出包体积分析报告网页
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongzhi107 committed Apr 19, 2018
1 parent 6f4f5a7 commit cdb478c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/bin/packing-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ webpack(webpackConfig, (err, stats) => {
} else {
console.log(stats.toString(stats));
console.log('[build]:💚 Webpack 打包成功。');
}

if (visualizerEnable) {
const file = resolve(context, distRoot, 'stats.html');
const message = `[webpack-visualizer-plugin]: 模块报表已经生成,该报表可以指导优化输出文件体积\n请运行 open file://${file} 查看报表`;
console.log(message);
if (program.open || visualizerOptions.open) {
open(`file://${file}`);
}
if (visualizerEnable) {
const file = resolve(context, distRoot, 'stats.html');
const message = `[webpack-visualizer-plugin]: 模块报表已经生成,该报表可以指导优化输出文件体积\n请运行 open file://${file} 查看报表`;
console.log(message);
if (program.open || visualizerOptions.open) {
open(`file://${file}`);
}
}
});

0 comments on commit cdb478c

Please sign in to comment.