ProgressBarWebpackPlugin

ProgressBarWebpackPlugin 可以帮助 npm 优雅地加载项目,直观展示项目加载进度。

安装

npm i -D progress-bar-webpack-plugin

基本用法

var ProgressBarPlugin = require('progress-bar-webpack-plugin');
...
var webpackConfig = {
entry: 'index.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'index_bundle.js'
},
plugins: [
...,
new ProgressBarPlugin({
complete: Chalk.green('█'),
incomplete: Chalk.white('█'),
format: ' build :bar ' + Chalk.green.bold(':percent') + ' (:elapsed seconds)'
})
]
};
效果