Skip to content
PluginStats

rollup-plugin-webpack-stats weekly downloads statistics

By relative-ci (5 listings) · npm · Vite plugins

Rollup/Vite/Rolldown plugin to generate a stats JSON file with a bundle-stats webpack-compatible structure

View on npm Fresh · Dec 6, 2026

rollup-plugin-webpack-stats has 437,276 recorded weekly downloads on npm, an increase of 8.0% over the past 30 days, ranking #415 of 3,247 tracked listings.

Weekly downloads
437,276
Official API · Dec 5, 2026
7-day growth
+19.1%
+70.2K weekly downloads
30-day growth
+8.0%
+32.3K weekly downloads
90-day growth
+96.9%
+215.2K weekly downloads
Rank
#415
▲ 10 in 7 days

About rollup-plugin-webpack-stats

rollup-plugin-webpack-stats

ci Socket Badge

Vite compatibility Rolldown compatibility Rollup compatibility

Rollup/Vite/Rolldown plugin to generate a stats JSON file with a bundle-stats webpack-compatible structure.

[!NOTE] This plugin generates a webpack-compatible stats JSON file for programmatic usage, inspection, or integration with other compatible tools. To analyze your Rollup/Vite/Rolldown bundle, use rollup-plugin-bundle-stats instead.

Install

npm install --dev rollup-plugin-webpack-stats

or

yarn add --dev rollup-plugin-webpack-stats

or

pnpm add -D rollup-plugin-webpack-stats

Configure

// rollup.config.js
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';

export default {
  plugins: [
    // add it as the last plugin
    webpackStatsPlugin(),
  ],
};
// vite.config.js
import { defineConfig } from 'vite';
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';

export default defineConfig((env) => ({
  plugins: [
    // Output webpack-stats.json file
    webpackStatsPlugin(),
  ],
}));
Options
  • fileName - the JSON filepath relative to the build folder or absolute(default: webpack-stats.json)
  • transform - access and mutate the resulting stats after the conversion: (stats: WebpackStatsFilterd, sources: TransformSources, bundle: OutputBundle) => WebpackStatsFilterd
  • moduleOriginalSize - extract module original size or rendered size (default: false)
  • write - format and write the stats to disk(default: fs.write(filename, JSON.stringify(stats, null, 2)))
  • rollup stats options (rollup-plugin-stats)
    • excludeAssets - exclude matching assets: string | RegExp | ((filepath: string) => boolean) | Array<string | RegExp | ((filepath: string) => boolean)>
    • excludeModules - exclude matching modules: string | RegExp | ((filepath: string) => boolean) | Array<string | RegExp | ((filepath: string) => boolean)>
Examples
Output to a custom filename
// rollup.config.js
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';

module.exports = {
  plugins: [
    // add it as the last plugin
    webpackStatsPlugin({
      filename: 'artifacts/stats.json',
    }),
  ],
};
Exclude .map files
// rollup.config.js
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';

export default {
  plugins: [
    // add it as the last plugin
    webpackStatsPlugin({
      excludeAssets: /\.map$/,
    }),
  ],
};
Vite.js - multiple stats files when using plugin-legacy
// for the the modern and legacy outputs
import { defineConfig } from 'vite';
import legacy from '@vitejs/plugin-legacy';
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';

export default defineConfig((env) => ({
  build: {
    rollupOptions: {
      output: {
        plugins: [
          // Output webpack-stats-modern.json file for the modern build
          // Output webpack-stats-legacy.json file for the legacy build
          // Stats are an output plugin, as plugin-legacy works by injecting
          // an additional output, that duplicates the plugins configured here
          webpackStatsPlugin((options) => {
            const isLegacy = options.format === 'system';
            return {
              fileName: `webpack-stats${isLegacy ? '-legacy' : '-modern'}.json`,
            };
          }),
        ],
      },
    },
  },
  plugins: [
    legacy({
      /* Your legacy config here */
    }),
  ],
}));
Vite.js - update initial flag for chunks where the inital flag is incorrectly set to false
import { defineConfig } from 'vite';
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';

export default defineConfig((env) => ({
  build: {
    rollupOptions: {
      output: {
        plugins: [
          webpackStatsPlugin({
            transform: (stats) => {
              // Find the target chunk entry
              const mainChunkIndex = stats.chunks?.findIndex((chunk) =>
                chunk.names?.includes('main')
              );

              // When the tartget chunk is found, set the initial flag to true
              if (
                typeof mainChunkIndex !== 'undefined' &&
                stats?.chunks?.[mainChunkIndex]
              ) {
                stats.chunks[mainChunkIndex] = {
                  ...stats.chunks[mainChunkIndex],
                  initial: true,
                };
              }…

Description from the npm listing.

  • vite
  • rolldown
  • rollup
  • vite-plugin
  • rolldown-plugin
  • rollup-plugin
  • stats
  • bundle-stats

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

rollup-plugin-webpack-stats weekly downloads on npm, last 90 days: 437,276 weekly downloads as of Dec 5, 2026, +96.9% over 90 days.rollup-plugin-webpack-statsWeekly downloads on npm · Last 90 days437,276downloads / week+96.9% over 90 days0100K200K300K400K500KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
rollup-plugin-webpack-stats weekly downloads on npm, last 90 days: 437,276 weekly downloads as of Dec 5, 2026, +96.9% over 90 days.

7/30/90-day growth

rollup-plugin-webpack-stats weekly downloads growth on npm: +19.1% over 7 days, +8.0% over 30 days, +96.9% over 90 days.rollup-plugin-webpack-statsWeekly downloads growth on npm437,276downloads / week now7-day growth+70,185 weekly downloads+19.1%30-day growth+32,298 weekly downloads+8.0%90-day growth+215,230 weekly downloads+96.9%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
rollup-plugin-webpack-stats weekly downloads growth on npm: +19.1% over 7 days, +8.0% over 30 days, +96.9% over 90 days.

Ranking history

rollup-plugin-webpack-stats npm ranking history: currently #415 (by weekly downloads).rollup-plugin-webpack-statsnpm ranking · by weekly downloads · Last 90 days#415current rank#400#410#420#430#440#450#460Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
rollup-plugin-webpack-stats npm ranking history: currently #415 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 21, #15 (overall #415)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 3, #17 (overall #57)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for rollup-plugin-webpack-stats
Date (UTC)Weekly downloadsChange vs. previous
437,276+4.7K
432,554+34.1K
398,433+38.8K
359,616+25.5K
334,115-13.4K
347,484-15K
362,470-4.6K
367,091-5.9K
373,010-30.8K
403,832-31.7K
435,482-25.2K
460,704+3.9K
456,795-14.4K
471,169—

Similar npm Vite plugins plugins

All 20 rollup-plugin-webpack-stats alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/rollup-plugin-webpack-stats. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.