YOU'VE MADE A BRAVE DECISION, WELCOME.

每一个不曾起舞的日子都是对生命的辜负。

Webpack打包编译进度显示

1. 配置命令行选项

1
webpack --progress

2. ProgressPlugin插件

1
2
3
new webpack.ProgressPlugin(function handler(percentage, msg) {
console.log((percentage.toFixed(2) * 100) + '%', msg);
})

3. progress-bar-webpack-plugin插件

progress-bar

安装:https://www.npmjs.com/package/progress-bar-webpack-plugin

配置:

1
2
3
4
5
new ProgressBarPlugin({
format: ' build [:bar] :percent (:elapsed seconds)',
clear: false,
width: 60
})