8000 GitHub - unjs/webpackbar at v1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Elegant ProgressBar and Profiler for Webpack 3 , 4 and 5

License

Notifications You must be signed in to change notification settings

unjs/webpackbar

 
 

Repository files navigation

npm deps test test-windows coverage

Elegant ProgressBar and Profiler for Webpack

✔ Display elegant progress bar while building or watch

✔ Support of multiply concurrent builds (useful for SSR)

✔ Pretty print filename and loaders

✔ Windows compatible

✔ Customizable

✔ Advanced build profiler


Multi progress bars



Build Profiler


Getting Started

To begin, you'll need to install webpackbar:

Using npm:

npm install webpackbar

Using yarn:

yarn add webpackbar

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()
  ]
};

Options

enabled

By default only enabled when TTY is available and not running in a CI environment.

You can force override this option by setting it to true or false.

name

  • Default: webpack

Display name

color

  • Default: green

Display color (can be hex (#xxyyzz) or a web color like green)

profile

  • Default: false

Enable profiler

stream

  • Default: process.stdout

Output stream.

showCursor

  • Default: false

Show the cursor. This can be useful when a CLI accepts input from a user.

clear

  • Default: true

Auto clear console when compile is finished.

done

  • Type: Function(sharedState, ctx)

A function that will be called when all builds are finished.

buildTitle

  • Default: BUILDING

Maintainers


Pooya Parsa
0