A webpack plugin to gather build data, render useful analysis of how your bundles transform over time and make suggestions on how you can keep your compiled application optimized.
Use webpack monitor in your production build configuration to keep track of changes to webpack's output throughout the development process. Identify builds where heavyweight libraries are introduced. See how much you could reduce asset file size using common optimization methods. Prioritize optimizations based on what will be most beneficial to your project.
Install the plugin with npm:
npm install webpack-monitor --save-dev
const WebpackMonitor = ;const webpackConfig =entry: 'index.js'output:path: __dirname + '/dist'filename: 'bundle.js'plugins:capture: truelaunch: true;
The plugin accepts the following options.
target: The route for the outputted JSON stats file (relative to build directory). Defaults to
launch: If true, start server and launch webpack monitor analysis dashboard. Default
capture: Capture stats on current build if different from previous build. Default
port: port at which to serve webpack monitor dashboard on launch. Default