JSPM

bundle-stats

1.0.0-rc.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20744
  • Score
    100M100P100Q141145F
  • License MIT

Generate bundle report based on Webpack stats data.

Package Exports

  • bundle-stats

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bundle-stats) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Webpack Bundle Stats

bundle-stats version TravisCI badge

CLI to generate reports based on Webpack stats data.

Demo - one job | Demo - multiple jobs

screenshot

Install

npm install -g bundle-stats

or

yarn global add bundle-stats

Configuration

Configure Webpack stats to output the necessary data:

{
  stats: {
    assets: true,
    entrypoints: true,
    chunks: true,
    modules: true
  }
}

More info

Usage

$ bundle-stats -h
Usage: webpack-bundle-stats OPTIONS [STATS_FILE]...

Options:
  --html         Save HTML report                      [boolean] [default: true]
  --json         Save JSON data                       [boolean] [default: false]
  --demo         Generate demo reports                          [default: false]
  -d, --out-dir  Output directory                            [default: "./dist"]
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]
$ bundle-stats --html --json __fixtures__/webpack-stats-0.json __fixtures__/webpack-stats-1.json
  ✔ Read Webpack stat files
  ✔ Gather data
  ✔ Generate reports
  ✔ Save reports

Reports saved:
- ./dist/report.html
- ./dist/report.json