UNPKG

1.6 kBTypeScriptView Raw
1import { Plugin } from "rollup";
2
3declare namespace visualizer {
4 interface PluginVisualizerOptions {
5 /**
6 * Name of the file with diagram to generate
7 * @default "stats.html"
8 */
9 filename?: string | undefined;
10 /**
11 * Title tag value
12 * @default "Rollup Visualizer"
13 */
14 title?: string | undefined;
15 /**
16 * Use sourcemaps to calculate sizes (e.g. after UglifyJs or Terser)
17 * @default false
18 */
19 sourcemap?: boolean | undefined;
20 /**
21 * Open generated file in default user agent
22 * @default false
23 */
24 open?: boolean | undefined;
25 /**
26 * Which diagram type to use
27 * @default "treemap"
28 */
29 template?: "treemap" | "sunburst" | "network" | undefined;
30 /**
31 * Product portable json file that can be used with
32 * plugin CLI util to generate graph from several json files.
33 * Every UI property ignored in this case.
34 * @default false
35 */
36 json?: boolean | undefined;
37 /**
38 * Collect gzip size from source code and display it at chart
39 * @default false
40 */
41 gzipSize?: boolean | undefined;
42 /**
43 * Collect brotli size from source code and display it at chart.
44 * Only if current node version supports it
45 * @default false
46 */
47 brotliSize?: boolean | undefined;
48 }
49}
50
51declare function visualizer(options?: visualizer.PluginVisualizerOptions): Plugin;
52
53export = visualizer;