Registry / devops / rollup-plugin-bundle-size

rollup-plugin-bundle-size

JSON →
library1.0.3jsnpmunverified

A Rollup plugin that displays the size of the generated bundle(s) after build. v1.0.3 (last release). It provides a simple, no-frills way to see bundle size in the console output. Unlike more comprehensive tools like rollup-plugin-visualizer, it focuses solely on size reporting without additional analysis. Works with Rollup's plugin system. No recent updates; considered stable but minimal.

npm install rollup-plugin-bundle-size
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-BUND
R
rollup-plugin-bundle-size
devopsjavascriptv1.0.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bundleSize
import bundleSize from 'rollup-plugin-bundle-size'
const bundleSize = require('rollup-plugin-bundle-size')
Default export; ESM import works if using native ES modules. CommonJS require works with Rollup's CJS handling.
bundleSize
const bundleSize = require('rollup-plugin-bundle-size')
import { bundleSize } from 'rollup-plugin-bundle-size'
CommonJS require works. Named import is incorrect; it's a default export.
bundleSize
import bundleSize from 'rollup-plugin-bundle-size'
import bundleSize from 'rollup-plugin-bundle-size/bundle-size'
No subpath exports; just import from the package name.

Shows how to integrate bundleSize plugin in Rollup config to log bundle size after build.

import bundleSize from 'rollup-plugin-bundle-size'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'cjs' }, plugins: [bundleSize()] };
Debug
Known issues
deprecatedPlugin may be unmaintained; no updates since 2019.
fix
Consider using rollup-plugin-visualizer or rollup-plugin-filesize for active maintenance and more features.
affects: *
gotchaThe plugin only shows size for the first output bundle; does not report multiple outputs.
fix
Use a workaround or switch to an alternative if you have multiple output targets.
affects: *
gotchaOutput format may not reflect tree-shaken size accurately for ESM outputs.
fix
Verify size with actual bundle inspection or use a more detailed analyzer.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-bundle-size'
Missing or incorrect npm install
fix
Run 'npm install --save-dev rollup-plugin-bundle-size'
TypeError: bundleSize is not a function
Incorrect import of named export instead of default
fix
Use 'import bundleSize from 'rollup-plugin-bundle-size'' or 'const bundleSize = require('rollup-plugin-bundle-size')'
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
rollup-plugin-bundle-size — npm install rollup-plugin-bundle-size · libregistry