{"library":"rollup-plugin-analyzer","title":"rollup-plugin-analyzer","description":"Rollup plugin that prints detailed bundle analysis metrics to the console, including bundle size, original size, code reduction percentage, module count, and per-file breakdown with rendered size, original size, relative contribution, and dependents. Version 4.0.0 supports Rollup 2.x/3.x. Outputs formatted tables and optional summary-only view. Useful for CI gating via onAnalysis callback. Differentiators include zero dependencies, optional CI integration, and summaryOnly mode for concise output.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-analyzer"],"cli":null},"imports":["import analyze from 'rollup-plugin-analyzer'","const analyze = require('rollup-plugin-analyzer')","import analyze from 'rollup-plugin-analyzer';\nanalyze({ onAnalysis: ({ bundleSize }) => { /* ... */ } })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport analyze from 'rollup-plugin-analyzer';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'cjs'\n  },\n  plugins: [\n    analyze({\n      summaryOnly: true,\n      limit: 10,\n      filter: (module) => !module.includes('node_modules'),\n      onAnalysis: ({ bundleSize, moduleCount }) => {\n        console.log(`Bundle size: ${bundleSize} bytes, modules: ${moduleCount}`);\n      }\n    })\n  ]\n};","lang":"javascript","description":"Configure rollup-plugin-analyzer with summary-only output, limiting to top 10 modules, filtering out node_modules, and calling onAnalysis callback for custom reporting.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}