You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

rollup-plugin-stats

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-stats

Output Rollup stats

1.4.2
latest
Source
npmnpm
Version published
Weekly downloads
54K
0.89%
Maintainers
0
Weekly downloads
 
Created
Source

rollup-plugin-stats

npm Socket Badge ci

Output Rollup stats JSON file

Install

npm install --dev rollup-plugin-stats

or

yarn add --dev rollup-plugin-stats

Configure

Vite

// vite.config.mjs
import { defineConfig } from 'vite';
import pluginStats from 'rollup-plugin-stats';

export default defineConfig({
  // your vite config
  plugins: [
    // add it as the last plugin
    pluginStats(),
  ],
});

Rollup

// rollup.config.mjs
import { defineConfig } from 'rollup';
import pluginStats from 'rollup-plugin-stats';

export default defineConfig({
  // your rollup config
  plugins: [
    // add it as the last plugin
    pluginStats(),
  ],
});
// rollup.config.js
const { defineConfig } = require('rollup');
const pluginStats = require('rollup-plugin-stats');

module.exports = defineConfig({
  // your rollup config
  plugins: [
    // add it as the last plugin
    pluginStats(),
  ],
});

Rolldown

// rolldown.config.js
import { defineConfig } from 'rolldown';
import pluginStats from 'rollup-plugin-stats';

export default defineConfig({
  // your rolldown config
  plugins: [
    // add it as the last plugin
    pluginStats(),
],
});

Options

  • fileName - the JSON filepath relative to the build folder or absolute(default: stats.json)
  • write - format and write the stats to disk(default: fs.write(filename, JSON.stringify(stats, null, 2)))
  • stats
    • source - output asset/chunk/module source (default false)
    • 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)>

rollup-plugin-webpack-stats

Generate rollup stats JSON file with a bundle-stats webpack supported structure.

bundle-stats

Analyze webpack stats(bundle size, assets, modules, packages) and compare the results between different builds. Support for webpack, rspack, vite, rollup.

: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

Keywords

vite

FAQs

Package last updated on 26 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts