webpack-info-plugin

raw JSON →
0.1.0 verified Sat Apr 25 auth: no javascript

A simple webpack plugin that displays build status and formatted stats output during development, similar to webpack-dev-middleware. Version 0.1.0 is the initial and only release. Provides configuration for stats display and state notifications (valid/invalid). Minimal dependencies (only webpack peer dependency). Differentiator: lightweight, configuration-focused, no extra middleware required.

error TypeError: WebpackInfoPlugin is not a constructor
cause Importing incorrectly or not using 'new'.
fix
Use const WebpackInfoPlugin = require('webpack-info-plugin'); new WebpackInfoPlugin(options);
error Error: Options for verbosity must be webpack stats options
cause Passing an array or string instead of object for stats.
fix
Provide an object with valid stats keys, e.g., { colors: true }.
error Module not found: Error: Can't resolve 'webpack-info-plugin'
cause Package not installed or import path wrong.
fix
Run npm install webpack-info-plugin --save-dev and ensure correct require path.
gotcha Options 'stats' expects webpack stats toString options; 'colors' not 'color'.
fix Use correct option key as shown in documentation.
gotcha Plugin constructs with 'new' keyword; do not call as function.
fix Use new WebpackInfoPlugin(options).
deprecated This package has one release and is no longer maintained; consider using webpack-dev-middleware or @webpack-cli/serve for modern use.
fix Migrate to webpack-dev-middleware for stats display.
gotcha Stats display may be verbose; cannot suppress all output without setting stats to false.
fix Set stats: false to disable, or configure individual options.
npm install webpack-info-plugin
yarn add webpack-info-plugin
pnpm add webpack-info-plugin

Configures webpack-info-plugin with custom stats and state display in webpack config.

const WebpackInfoPlugin = require('webpack-info-plugin');

module.exports = {
  entry: './src/index.js',
  output: { path: __dirname + '/dist', filename: 'bundle.js' },
  plugins: [
    new WebpackInfoPlugin({
      stats: {
        colors: true,
        version: false,
        hash: false,
        timings: true,
        assets: false,
        chunks: false,
        chunkModules: false,
        modules: false
      },
      state: true
    })
  ]
};