{"id":27251613,"url":"https://github.com/relative-ci/rollup-plugin-stats","last_synced_at":"2026-01-04T12:08:10.627Z","repository":{"id":153781576,"uuid":"630660571","full_name":"relative-ci/rollup-plugin-stats","owner":"relative-ci","description":"Output Rollup stats JSON file","archived":false,"fork":false,"pushed_at":"2025-04-07T02:22:35.000Z","size":971,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T03:25:34.962Z","etag":null,"topics":["bundle-stats","rollup","rollup-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relative-ci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-20T21:40:56.000Z","updated_at":"2025-03-28T21:34:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"319db40d-c37f-4e55-95fd-4950856795eb","html_url":"https://github.com/relative-ci/rollup-plugin-stats","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Frollup-plugin-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Frollup-plugin-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Frollup-plugin-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Frollup-plugin-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relative-ci","download_url":"https://codeload.github.com/relative-ci/rollup-plugin-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322599,"owners_count":21084337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle-stats","rollup","rollup-plugin"],"created_at":"2025-04-11T01:11:12.540Z","updated_at":"2026-01-04T12:08:10.621Z","avatar_url":"https://github.com/relative-ci.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-stats\n\n[![](https://img.shields.io/npm/v/rollup-plugin-stats.svg)](https://www.npmjs.com/package/rollup-plugin-stats)\n[![npm](https://img.shields.io/npm/dm/rollup-plugin-stats)](https://www.npmjs.com/package/rollup-plugin-stats)\n![](https://img.shields.io/node/v/rollup-plugin-stats.svg)\n[![Socket Badge](https://socket.dev/api/badge/npm/package/rollup-plugin-stats)](https://socket.dev/npm/package/rollup-plugin-stats)\n[![ci](https://github.com/relative-ci/rollup-plugin-stats/actions/workflows/ci.yml/badge.svg)](https://github.com/relative-ci/rollup-plugin-stats/actions/workflows/ci.yml)\n\nOutput Rollup stats JSON file\n\n## Install\n\n```shell\nnpm install --dev rollup-plugin-stats\n```\n\nor\n\n```shell\nyarn add --dev rollup-plugin-stats\n```\n\n## Configure\n\n### Vite\n\n```js\n// vite.config.mjs\nimport { defineConfig } from 'vite';\nimport pluginStats from 'rollup-plugin-stats';\n\nexport default defineConfig({\n  // your vite config\n  plugins: [\n    // add it as the last plugin\n    pluginStats(),\n  ],\n});\n```\n\n### Rollup\n\n```js\n// rollup.config.mjs\nimport { defineConfig } from 'rollup';\nimport pluginStats from 'rollup-plugin-stats';\n\nexport default defineConfig({\n  // your rollup config\n  plugins: [\n    // add it as the last plugin\n    pluginStats(),\n  ],\n});\n```\n\n```js\n// rollup.config.js\nconst { defineConfig } = require('rollup');\nconst pluginStats = require('rollup-plugin-stats');\n\nmodule.exports = defineConfig({\n  // your rollup config\n  plugins: [\n    // add it as the last plugin\n    pluginStats(),\n  ],\n});\n```\n\n### Rolldown\n\n```js\n// rolldown.config.js\nimport { defineConfig } from 'rolldown';\nimport pluginStats from 'rollup-plugin-stats';\n\nexport default defineConfig({\n  // your rolldown config\n  plugins: [\n    // add it as the last plugin\n    pluginStats(),\n],\n});\n```\n\n### Options\n\n- `fileName` - the JSON filepath relative to the build folder or absolute(default: `stats.json`)\n- `write` - format and write the stats to disk(default: `fs.write(filename, JSON.stringify(stats, null, 2))`)\n- `stats` \n    - `source` - output asset/chunk/module source (default `false`)\n    - `map` - output chunk map property (default: `false`)\n    - `excludeAssets` - exclude matching assets: `string | RegExp | ((filepath: string) =\u003e boolean) | Array\u003cstring | RegExp | ((filepath: string) =\u003e boolean)\u003e`\n    - `excludeModules` - exclude matching modules: `string | RegExp | ((filepath: string) =\u003e boolean) | Array\u003cstring | RegExp | ((filepath: string) =\u003e boolean)\u003e`\n\n## Related projects\n\n### [bundle-stats](https://github.com/relative-ci/bundle-stats)\n\nAnalyze bundle stats(bundle size, assets, modules, packages) and compare the results between different builds. Support for webpack, rspack, vite, rolldown and rollup.\n\n### [rollup-plugin-webpack-stats](https://github.com/relative-ci/rollup-plugin-webpack-stats)\n\nGenerate vite/rollup/rolldown stats JSON file with a [bundle-stats](https://github.com/relative-ci/bundle-stats/tree/master/packages/cli) webpack [supported structure](https://github.com/relative-ci/bundle-stats/blob/master/packages/plugin-webpack-filter/src/index.ts).\n\n### :cyclone: [relative-ci.com](https://relative-ci.com?utm_medium=rollup-plugin-stats)\n\n#### Automated bundle analysis, reviews and monitoring - Quickly identify and fix bundle regressions before shipping to production.\n\n- :crystal_ball: In-depth bundle stats analysis for every build\n- :chart_with_upwards_trend: Monitor bundle stats changes and identify opportunities for optimizations\n- :bell: Quick feedback with [rule based automated review flow](https://relative-ci.com/documentation/setup/configure/integrations/github-commit-status-review?utm_medium=rollup-plugin-stats), [GitHub Pull Request comments](https://relative-ci.com/documentation/setup/configure/integrations/github-pull-request-comment?utm_medium=rollup-plugin-stats), [GitHub check reports](https://relative-ci.com/documentation/setup/configure/integrations/github-check-report?utm_medium=rollup-plugin-stats), or [Slack messages](https://relative-ci.com/documentation/setup/configure/integrations/slack-notification?utm_medium=rollup-plugin-stats)\n- :wrench: Support for **webpack**, **vite**, **rspack**, **rollup**, **rolldown**\n- :hammer: Support for all major CI services(CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)\n- :nut_and_bolt: Support for **npm**, **yarn** and **pnpm**; support for monorepos\n- :two_hearts: [**Always free** for **Open Source**](https://relative-ci.com/open-source?utm_medium=rollup-plugin-stats)\n\n[:rocket: Get started](https://relative-ci.com?utm_medium=rollup-plugin-stats)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelative-ci%2Frollup-plugin-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelative-ci%2Frollup-plugin-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelative-ci%2Frollup-plugin-stats/lists"}