{"id":21943,"library":"rollup-plugin-bundle-size","title":"rollup-plugin-bundle-size","description":"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.","status":"active","version":"1.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/vimeo/rollup-plugin-bundle-size","tags":["javascript","rollup-plugin"],"install":[{"cmd":"npm install rollup-plugin-bundle-size","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-bundle-size","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-bundle-size","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export; ESM import works if using native ES modules. CommonJS require works with Rollup's CJS handling.","wrong":"const bundleSize = require('rollup-plugin-bundle-size')","symbol":"bundleSize","correct":"import bundleSize from 'rollup-plugin-bundle-size'"},{"note":"CommonJS require works. Named import is incorrect; it's a default export.","wrong":"import { bundleSize } from 'rollup-plugin-bundle-size'","symbol":"bundleSize","correct":"const bundleSize = require('rollup-plugin-bundle-size')"},{"note":"No subpath exports; just import from the package name.","wrong":"import bundleSize from 'rollup-plugin-bundle-size/bundle-size'","symbol":"bundleSize","correct":"import bundleSize from 'rollup-plugin-bundle-size'"}],"quickstart":{"code":"import bundleSize from 'rollup-plugin-bundle-size';\nexport default {\n  input: 'src/index.js',\n  output: { file: 'dist/bundle.js', format: 'cjs' },\n  plugins: [bundleSize()]\n};","lang":"javascript","description":"Shows how to integrate bundleSize plugin in Rollup config to log bundle size after build."},"warnings":[{"fix":"Consider using rollup-plugin-visualizer or rollup-plugin-filesize for active maintenance and more features.","message":"Plugin may be unmaintained; no updates since 2019.","severity":"deprecated","affected_versions":"*"},{"fix":"Use a workaround or switch to an alternative if you have multiple output targets.","message":"The plugin only shows size for the first output bundle; does not report multiple outputs.","severity":"gotcha","affected_versions":"*"},{"fix":"Verify size with actual bundle inspection or use a more detailed analyzer.","message":"Output format may not reflect tree-shaken size accurately for ESM outputs.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev rollup-plugin-bundle-size'","cause":"Missing or incorrect npm install","error":"Error: Cannot find module 'rollup-plugin-bundle-size'"},{"fix":"Use 'import bundleSize from 'rollup-plugin-bundle-size'' or 'const bundleSize = require('rollup-plugin-bundle-size')'","cause":"Incorrect import of named export instead of default","error":"TypeError: bundleSize is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}