Webpack Report

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

Webpack Report is a webpack plugin (version 2.0.3) that provides a comprehensive build analysis with an interactive dashboard. It visualizes assets, modules, chunks, and dependency information, and displays build warnings and errors. It requires webpack as a peer dependency. Key differentiators include a built-in server to host the report, auto-opening in the browser, and customizable stats options. The plugin is actively maintained, though it is not as widely used as alternatives like webpack-bundle-analyzer. Release cadence is not specified but appears infrequent.

error Cannot find module 'webpack-report'
cause Package not installed or not in node_modules.
fix
Run 'npm install webpack-report' or 'yarn add webpack-report'.
error TypeError: WebpackReport is not a constructor
cause Missing 'new' keyword when instantiating the plugin.
fix
Use 'new WebpackReport(options)'.
error Error: listen EADDRINUSE :::1237
cause Another instance is already using the default port 1237.
fix
Set a different port via { port: 1238 } or kill the other process.
gotcha Plugin uses internal webpack hooks that may break with webpack 5+
fix Check compatibility with your webpack version. The plugin may need updates for webpack 5.
deprecated The 'open' option is true by default and opens a browser tab, which may be undesirable in CI
fix Set { open: false } to suppress browser opening.
gotcha The plugin starts a local server; multiple webpack builds may conflict on port 1237
fix Specify a unique port per build via options.
gotcha There is no TypeScript declaration file (.d.ts) shipping with the package
fix Create your own type declarations or use @types/webpack-report if available.
npm install webpack-report
yarn add webpack-report
pnpm add webpack-report

Shows how to add the WebpackReport plugin to a webpack configuration with default options.

// webpack.config.js
const WebpackReport = require('webpack-report');

module.exports = {
  plugins: [
    new WebpackReport({
      host: 'localhost',
      port: 1237,
      open: true,
      statsOptions: {
        all: true,
        assets: true,
        chunks: true,
        modules: true,
        errors: true,
        warnings: true
      }
    })
  ]
};