✔ Display elegant progress bar while building or watch
✔ Support of multiple concurrent builds (useful for SSR)
✔ Pretty print filename and loaders
✔ Windows compatible
✔ Customizable
✔ Advanced build profiler
To begin, you'll need to install webpackbar
:
Using npm:
npm install webpackbar -D
Using yarn:
yarn add webpackbar -D
Then add the reporter as a plugin to your webpack config.
webpack.config.js
const webpack = require('webpack');
const WebpackBar = require('webpackbar');
module.exports = {
context: path.resolve(__dirname),
devtool: 'source-map',
entry: './entry.js',
output: {
filename: './output.js',
path: path.resolve(__dirname)
},
plugins: [
new WebpackBar()
]
};
- Default:
webpack
Display name
- Default:
green
Display color (can be HEX like #xxyyzz
or a web color like green
).
- Default:
false
Enable profiler.
- Default:
process.stderr
Output stream.
- Default: Auto enabled on CI, non-TTY and test environments
Hide progress bar and only show Compiling/Compiled messages.
- Default:
true
Show Compiled in
message after build.
- Type:
Function(sharedState, ctx)
A function that will be called when all builds are finished.
Pooya Parsa |