{"id":21913,"library":"rollup-plugin-analyze","title":"rollup-plugin-analyze","description":"A Rollup plugin that generates an interactive HTML visualization of your bundle's module sizes and dependencies. Version 0.4.0 is the latest stable release with no active development observed since 2020. It provides a full-page visual breakdown similar to Webpack Bundle Analyzer, but as a Rollup-specific solution. Key differentiator: it outputs a standalone HTML file with drill-down capability, unlike other tools like rollup-plugin-visualizer which offers multiple output formats. Supports Rollup and Vite via plugin compatibility.","status":"maintenance","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/shuoshubao/rollup-plugin-analyze","tags":["javascript","rollup","plugin","analyze","analyzer","analysis"],"install":[{"cmd":"npm install rollup-plugin-analyze","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-analyze","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-analyze","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for the plugin to hook into Rollup's build process","package":"rollup","optional":false}],"imports":[{"note":"Works in both ESM and CJS environments. The default export is a function that returns a Rollup plugin object.","wrong":"const Analyze = require('rollup-plugin-analyze')","symbol":"default export","correct":"import Analyze from 'rollup-plugin-analyze'"}],"quickstart":{"code":"// vite.config.js\nimport react from '@vitejs/plugin-react'\nimport Analyze from 'rollup-plugin-analyze'\n\nexport default () => {\n  return {\n    plugins: [react(), Analyze()]\n  }\n}","lang":"javascript","description":"Shows integration with Vite using React plugin plus Rollup analyzer."},"warnings":[{"fix":"Use rollup-plugin-visualizer or fork/upgrade the plugin.","message":"Only supports Rollup 1.x or 2.x; no explicit support for Rollup 3+ or 4+.","severity":"gotcha","affected_versions":">=3.0"},{"fix":"Create a manual .d.ts file or ignore type errors with // @ts-ignore.","message":"No TypeScript typings included in the package.","severity":"gotcha","affected_versions":"0.4.0"},{"fix":"Test with your output format; consider using a more maintained alternative like rollup-plugin-visualizer.","message":"The plugin may not work with Rollup's output format 'es' or 'cjs' correctly; tested only with 'iife' in examples.","severity":"gotcha","affected_versions":"0.4.0"},{"fix":"If customization needed, use another plugin like rollup-plugin-visualizer or fork this one.","message":"No configuration options exposed; Analyze() takes no arguments and uses defaults.","severity":"gotcha","affected_versions":"0.4.0"}],"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-analyze","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'rollup-plugin-analyze'"},{"fix":"Use `import Analyze from 'rollup-plugin-analyze'` (default import) or `const Analyze = require('rollup-plugin-analyze')` for CJS.","cause":"Incorrect import syntax: using default import where module uses named export or vice versa.","error":"TypeError: Analyze is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}