4.12.2 • Published 2 days ago

rollup-plugin-bundle-stats v4.12.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

rollup-plugin-bundle-stats

Table of Contents

Install

npm install --dev rollup-plugin-bundle-stats

or

yarn add --dev rollup-plugin-bundle-stats

Configure

Rollup

// rollup.config.js
const { bundleStats } = require('rollup-plugin-bundle-stats');

module.exports = {
  ...,
  plugins: [
    bundleStats()
  ]
};

Vite

// vite.config.js
const { bundleStats } = require('rollup-plugin-bundle-stats');

module.exports = {
  ...,
  plugins: [
    bundleStats()
  ]
};

Options

  • compare - use local saved stats for comparison (default true).
  • baseline - save current webpack stats as baseline (default false).
  • baselineFilepath - baseline absolute filepath or relative filepath to output.dir (default 'node_modules/.cache/bundle-stats/baseline.json')
  • html - output html report (default true).
  • json - output json report (default false).
  • outDir - output directory inside rollup output director output.dir (default '').
  • silent - stop logging info and only log warning and error (default false).

Compare mode

In compare mode, the metrics are compared against an existing(node_modules/.cache/bundle-stats/baseline.json) rollup stats file(baseline). To generate the baseline webpack stats, set BUNDLE_STATS_BASELINE environmental variable to true or set the plugin baseline option to true:

# Checkout to the branch/tag/commit where you want to generate the baseline
$ git checkout master

# Build your application with BUNDLE_STATS_BASELINE environmental variable
$ BUNDLE_STATS_BASELINE=true npm run build

# Checkout to the working branch/tag/commit
$ git checkout MY_FEATURE_BRANCH

# Build your application
$ npm run build

The option can be disabled by setting the plugin compare option to false.

Other packages

bundle-stats

npm npm

CLI to generate bundle stats report.

bundle-stats-webpack-plugin

npm npm

Webpack plugin to generate bundle stats report.

gatsby-plugin-bundle-stats

npm npm

Gatsby plugin for bundle-stats.

next-plugin-bundle-stats

npm npm

Next.js plugin for bundle-stats.

Related projects

:cyclone: relative-ci.com

Optimize your web app's performance with automated bundle stats analysis and monitoring.

  • :crystal_ball: In-depth bundle stats analysis for every build
  • :chart_with_upwards_trend: Monitor bundle stats changes and identify opportunities for optimizations
  • :bell: Rule based automated review flow, or get notified via GitHub Pull Request comments, GitHub check reports and Slack messages
  • :wrench: Support for webpack and beta support for Vite/Rollup
  • :hammer: Support for all major CI services(CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)
  • :nut_and_bolt: Support for npm, yarn and pnpm; support for monorepos
  • :two_hearts: Always free for Open Source

:rocket: Get started

:first_quarter_moon: relative-ci/compare

Standalone web application to compare Webpack/Lighthouse/Browsertime stats.

Compare bundle stats

:zap: bundle-stats-action

Github Action that generates bundle-stats reports.

4.13.0-beta.19

2 days ago

4.13.0-beta.18

3 days ago

4.13.0-beta.17

3 days ago

4.13.0-beta.16

12 days ago

4.13.0-beta.15

16 days ago

4.13.0-beta.14

19 days ago

4.13.0-beta.13

19 days ago

4.13.0-beta.12

20 days ago

4.13.0-beta.11

21 days ago

4.13.0-beta.10

25 days ago

4.13.0-beta.9

26 days ago

4.13.0-beta.7

1 month ago

4.13.0-beta.8

1 month ago

4.13.0-beta.6

1 month ago

4.13.0-beta.5

1 month ago

4.13.0-beta.3

1 month ago

4.13.0-beta.4

1 month ago

4.12.2

1 month ago

4.13.0-beta.2

2 months ago

4.12.1

2 months ago

4.13.0-beta.0

2 months ago

4.12.0

2 months ago

4.12.0-beta.4

2 months ago

4.12.0-beta.1

2 months ago

4.12.0-beta.3

2 months ago

4.12.0-beta.0

2 months ago

4.10.1

3 months ago

4.10.0

3 months ago

4.10.0-beta.0

3 months ago

4.9.3-beta.2

3 months ago

4.9.3-beta.1

3 months ago

4.9.3-beta.0

3 months ago

4.9.2-beta.1

3 months ago

4.9.2-beta.2

3 months ago

4.9.2-beta.3

3 months ago

4.9.2

3 months ago

4.9.1

4 months ago

4.9.0

4 months ago

4.9.1-beta.0

4 months ago

4.9.1-beta.2

4 months ago

4.9.1-beta.1

4 months ago

4.9.0-beta.0

4 months ago

4.8.4

4 months ago

4.8.4-beta.0

4 months ago

4.7.8

6 months ago

4.8.1

6 months ago

4.8.0

6 months ago

4.8.3

5 months ago

4.8.2

5 months ago

4.8.0-beta.0

6 months ago

4.8.1-beta.1

6 months ago

4.8.1-beta.0

6 months ago

4.8.1-beta.3

6 months ago

4.8.1-beta.2

6 months ago

4.7.8-beta.0

7 months ago

4.8.2-alpha.0

6 months ago

4.7.8-beta.1

6 months ago

4.7.5-beta.6

7 months ago

4.7.5-beta.5

7 months ago

4.7.6

7 months ago

4.7.5

7 months ago

4.7.7

7 months ago

4.7.2

7 months ago

4.7.1

7 months ago

4.7.4

7 months ago

4.7.3

7 months ago

4.7.5-alpha.0

7 months ago

4.7.0

7 months ago

4.7.0-rc.2

8 months ago

4.7.0-rc.1

8 months ago

4.7.0-rc.3

8 months ago

4.7.0-rc.5

8 months ago

4.7.5-beta.3

7 months ago

4.7.5-beta.2

7 months ago

4.7.6-beta.0

7 months ago

4.7.5-beta.0

7 months ago

4.3.0-beta.3

1 year ago

4.3.0-beta.2

1 year ago

4.3.0-beta.1

1 year ago

4.3.0-beta.0

1 year ago

4.3.0-alpha.0

1 year ago