rollup-plugin-visualizer
- Version 7.3.0
- Published
- 2.72 MB
- 4 dependencies
- MIT license
Install
npm i rollup-plugin-visualizeryarn add rollup-plugin-visualizerpnpm add rollup-plugin-visualizerOverview
Visualize and analyze bundle sizes and module dependencies in Rollup, Rolldown, and Vite.
Index
Functions
function visualizer
visualizer: { (pluginOptions?: PluginVisualizerOptions): VisualizerPlugin; ( pluginOptions: ( outputOptions: BundlerOutputOptions ) => PluginVisualizerOptions ): VisualizerPlugin; ( pluginOptions?: | PluginVisualizerOptions | ((outputOptions: BundlerOutputOptions) => PluginVisualizerOptions) ): VisualizerPlugin;};Deprecated
Pass an options object instead of a function.
Interfaces
interface BundlerOutputOptions
interface BundlerOutputOptions {}Only the members this plugin reads; see the note above about widening.
interface PluginVisualizerOptions
interface PluginVisualizerOptions {}property brotliSize
brotliSize?: boolean;If plugin should also calculate sizes of brotlied files.
false
property emitFile
emitFile?: boolean;Use rollup .emitFile API to generate files. Could be usefull if you want to output to configured by rollup output dir. When this set to true, filename options must be filename and not a path.
false
property exclude
exclude?: Filter | Filter[];A valid picomatch pattern, or array of patterns. If options.include is omitted or has zero length, filter will return true by default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
property filename
filename?: string;The path to the template file to use. Or just a name of a file.
Ignored with output: "link".
"stats.html"
property gzipSize
gzipSize?: boolean;If plugin should also calculate sizes of gzipped files.
false
property include
include?: Filter | Filter[];A valid picomatch pattern, or array of patterns. If options.include is omitted or has zero length, filter will return true by default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
property json
json?: boolean;If plugin should emit json file with visualizer data. It can be used with plugin CLI
false
Deprecated
use template 'raw-data'
property open
open?: boolean;If plugin should open browser with the generated file or report link. Ignored when
jsonoremitFileis true.false
property openOptions
openOptions?: OpenOptions;property output
output?: 'file' | 'link';Write a report file (default), or print a complete static viewer URL.
property projectRoot
projectRoot?: string | RegExp;Absolute path where project is located. It is used to cut prefix from file's paths.
process.cwd()
property sourcemap
sourcemap?: boolean;If plugin should use sourcemap to calculate sizes of modules. By idea it will present more accurate results.
gzipSizeandbrotliSizedoes not make much sense with this option.false
property template
template?: TemplateType;Which diagram to generate. 'sunburst' or 'treemap' can help find big dependencies or if they are repeated. 'treemap-3d' renders the same hierarchy as extruded boxes with a 3D camera. 'treemap-v2' adds a docked inspector for sizes, imports, and importers. 'network' can answer you why something was included. 'flamegraph' will be familar to tools that you know already. 'markdown' generates text report with notes about precision and config.
'treemap'
property title
title?: string;HTML value in generated file. Ignored when
jsonis true."Rollup Visualizer"
interface VisualizerPlugin
interface VisualizerPlugin {}property name
name: string;method generateBundle
generateBundle: ( this: BundlerPluginContext, outputOptions: BundlerNormalizedOutputOptions, outputBundle: BundlerOutputBundle) => Promise<void>;Package Files (2)
Dependencies (4)
Dev Dependencies (41)
- @rollup/plugin-commonjs
- @rollup/plugin-node-resolve
- @rollup/plugin-terser
- @rollup/plugin-typescript
- @types/bytes
- @types/d3-array
- @types/d3-color
- @types/d3-force
- @types/d3-hierarchy
- @types/d3-scale
- @types/d3-shape
- @types/node
- @types/picomatch
- @types/three
- @types/yargs
- bytes
- d3-array
- d3-color
- d3-force
- d3-hierarchy
- d3-scale
- d3-shape
- del-cli
- lucide-preact
- npm-run-all
- oxlint
- playwright
- postcss
- postcss-url
- preact
- prettier
- rolldown
- rollup
- rollup-plugin-postcss
- sass
- source-map
- three
- tslib
- typescript
- vite
- vitest
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rollup-plugin-visualizer.
- Markdown[](https://www.jsdocs.io/package/rollup-plugin-visualizer)
- HTML<a href="https://www.jsdocs.io/package/rollup-plugin-visualizer"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3400 ms. - Missing or incorrect documentation? Open an issue for this package.
