| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Visualize and analyze your bundle to quickly see which modules are taking up space.
npm install --save-dev rollup-plugin-visualizeror via yarn:
yarn add --dev rollup-plugin-visualizerThis package requires Node.js >= 22.
Import the plugin:
import { visualizer } from "rollup-plugin-visualizer";Or in CommonJS:
const { visualizer } = require("rollup-plugin-visualizer");import { visualizer } from "rollup-plugin-visualizer";
export default {
plugins: [
// Keep it last.
visualizer(),
],
};import { defineConfig, type RolldownPlugin } from "rolldown";
import { visualizer } from "rollup-plugin-visualizer";
export default defineConfig({
plugins: [visualizer() as RolldownPlugin],
});import { visualizer } from "rollup-plugin-visualizer";
export default {
plugins: [visualizer()],
};import { defineConfig, type PluginOption } from "vite";
import { visualizer } from "rollup-plugin-visualizer";
export default defineConfig({
plugins: [visualizer() as PluginOption],
});import { visualizer } from "rollup-plugin-visualizer";
export default {
plugins: [
visualizer({
emitFile: true,
filename: "stats.html",
}),
],
};SvelteKit may run Vite multiple times, so you can get 2-3 generated files in .svelte-kit/output (check Vite logs for exact locations).
You can also generate raw JSON reports and merge them with the CLI.
The circular view is useful for spotting large chunks of code. Clicking an arc zooms into that section and enlarges nested arcs for inspection.
This is a top-down version of the sunburst view and should feel familiar if you use other JavaScript performance tooling.
This rectangular hierarchical view makes large modules easy to find quickly. It can also reveal repeated modules, because repeated content tends to show similar structure and relative size.
Use this view to answer, "Why is this included?"
After the force layout stabilizes, you can drag nodes around. Gray circles are tree-shaken files.
In real projects, network graphs can look noisy. A practical way to explore them is:
Clicking a node highlights nodes listed in its tooltip (the files that import that node).
Produces JSON output with raw data. Usually used together with the CLI.
Produces a YAML file with report data. This is useful to commit and track bundle changes over time.
Produces a Markdown report with summary tables and notes about config and size precision.
Filter type: { bundle?: picomatchPattern, file?: picomatchPattern }
Note on include and exclude:
If include is omitted or empty, files are included by default.
Otherwise, an ID must match at least one include pattern and must not match any exclude pattern.
Filters use picomatch globs, and support these forms:
Format: BUNDLE_GLOB:FILE_GLOB (: is required when bundle matching is used).
This package provides a CLI utility: rollup-plugin-visualizer.
Use --help to see all available options:
rollup-plugin-visualizer [OPTIONS] stat1.json stat2.json ../stat3.jsonThis is useful when you have multiple build configs and want to combine reports into one chart.
For local development:
npm run buildGenerated HTML files do not include your source code contents. They only include:
This metadata can include:
See CHANGELOG.md.
| Back | FazBrowse Home | New Git URL |