rollup-plugin-visualizer

  • Version 5.12.0
  • Published
  • 687 kB
  • 4 dependencies
  • MIT license

Install

npm i rollup-plugin-visualizer
yarn add rollup-plugin-visualizer
pnpm add rollup-plugin-visualizer

Overview

[![NPM Version](https://img.shields.io/npm/v/rollup-plugin-visualizer.svg)](https://npmjs.org/package/rollup-plugin-visualizer) [![Node.js CI](https://github.com/btd/rollup-plugin-visualizer/actions/workflows/node.js.yml/badge.svg)](https://github.com/btd

Index

Functions

function visualizer

visualizer: (
opts?:
| PluginVisualizerOptions
| ((outputOptions: OutputOptions) => PluginVisualizerOptions)
) => Plugin;

    Interfaces

    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.

        "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 generated file. Ignored when json or emitFile is true.

        false

      property openOptions

      openOptions?: opn.Options;

        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. gzipSize and brotliSize does 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. 'network' can answer you why something was included

          'treemap'

        property title

        title?: string;
        • HTML value in generated file. Ignored when json is true.

          "Rollup Visualizer"

        Package Files (1)

        Dependencies (4)

        Dev Dependencies (41)

        Peer Dependencies (1)

        Badge

        To add a badge like this onejsDocs.io badgeto 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
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](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>