npm.io
4.22.2 • Published 1 month ago

gatsby-plugin-bundle-stats

Licence
MIT
Version
4.22.2
Deps
1
Size
10 kB
Vulns
0
Weekly
0
Stars
670

BundleStats screenshot

Demos: Bundle analysis comparison · Bundle analysis

BundleStats Gatsby plugin

Node version GitHub action Socket CodeQL

RelativeCI

- Bundle size and totals by file type(css, js, img, etc)
- Insights: duplicate packages, new packages
- Initial JS/CSS, Cache invalidation, and other bundle metrics
- Assets report (entrypoint, initial, types, changed, delta)
- Modules report (changed, delta, chunks, duplicate count and percentage)
- Packages report (count, duplicate, changed, delta)
Side by side comparison for multiple builds

Description

Analyze Gatsby bundle stats(bundle size, assets, modules, packages) and compare the results between different builds.

How to install

npm install --dev gatsby-plugin-bundle-stats

or

yarn add --dev gatsby-plugin-bundle-stats

Available options

See bundle-stats-webpack-plugin options.

Examples of usage

// In your gatsby-config.js
module.exports = {
  plugins: [
    'gatsby-plugin-bundle-stats'
  ]
};

or with custom options

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-bundle-stats',
      options: {
        compare: true,
        outDir: '../artifacts',
        stats: {
          context: './src'
        }
      }
    },
  ]
};

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 for webpack/rspack.

next-plugin-bundle-stats

npm npm

Next.js plugin for bundle-stats.

rollup-plugin-bundle-stats

npm npm

Rollup plugin to generate bundle stats report for vite/rolldown/rollup.

relative-ci.com
Automated bundle analysis, reviews and monitoring - Quickly identify and fix bundle regressions before shipping to production.

Get started

Get started

relative-ci/compare

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

Compare bundle stats

bundle-stats-action

Github Action that generates bundle-stats reports.

Keywords