Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

webpack-stats-report

cenfun2kMIT2.0.6

webpack-stats-report

readme

Webpack Stats Report

Generating Webpack Stats Report in HTML Grid.

npm npm

Preview Example Reports

Install

npm i webpack-stats-report -D

Usage

As a webpack plugin

// webpack.config.js
const StatsReportPlugin = require("webpack-stats-report").StatsReportPlugin;
module.exports = {
    // ... configuration settings here ...
    plugins: [new StatsReportPlugin({ 
        //options
        title: "Stats Report - webpack-stats-report",
        output: ".temp/stats-report.html"
    })]
};

As a Node API

const webpack = require('webpack');
const StatsReportGenerator = require("webpack-stats-report").StatsReportGenerator;
webpack(webpackConfig, async (err, stats) => {
   await StatsReportGenerator({
        //options
        title: "Stats Report - webpack-stats-report",
        output: ".temp/stats-report.html",
        //require one more option stats
        stats: stats.toJson({
            //source for gzipSize = true
            source: true,
            reasons: false,
            chunkModules: false
        })
    });
});

Options

//default options
{
    title: "Stats Report",
    output: "stats-report.html",
    outputStatsJson: false,
    gzipSize: false
    ...
}

more details: options.js

Test

npm run test

see test/test.js

Changelog

see CHANGELOG.md

changelog

Changelog

  • v2.0.6

    • updated deps
  • v2.0.5

    • updated deps
  • v2.0.4

    • updated deps
  • v2.0.3

    • updated deps
  • v2.0.0

    • updated UI with vine-ui

  • v1.2.4

    • fixed js error and icons
  • v1.2.3

    • fixed sync path
    • fixed report
  • v1.1.10

    • fixed ../../ path loader not matched issue
  • v1.1.9

    • fixed size issue
  • v1.1.8

    • fixed external "@pre-package/pre-name" issue
  • v1.1.7

    • added lz-string to minify json data
  • v1.1.6

    • fix gzip for webpack5 stats
  • v1.1.5

    • updated UI
  • v1.1.4

    • updated to webpack5
    • fixed json filename and webpack5 buildin
  • v1.1.3

    • fixed dependencies
    • fixed module path format issue
  • v1.1.2

    • added gzip size
  • v1.1.1

    • new layout