rollup-plugin-visualizer
Advanced tools
Comparing version 2.4.4 to 2.5.0
{ | ||
"name": "rollup-plugin-visualizer", | ||
"version": "2.4.4", | ||
"version": "2.5.0", | ||
"main": "plugin/index.js", | ||
@@ -5,0 +5,0 @@ "author": "Denis Bardadym <bardadymchik@gmail.com>", |
@@ -44,2 +44,4 @@ "use strict"; | ||
const bundlesRelative = !!opts.bundlesRelative; | ||
return { | ||
@@ -53,3 +55,3 @@ name: "visualizer", | ||
const roots = []; | ||
let roots = []; | ||
@@ -90,3 +92,3 @@ for (const [id, bundle] of Object.entries(outputBundle)) { | ||
default: { | ||
this.error(`Unknown template ${template}`); | ||
this.error(`Unknown template ${template} type`); | ||
} | ||
@@ -98,2 +100,14 @@ } | ||
if (bundlesRelative) { | ||
roots = [ | ||
{ | ||
id: "bundles", | ||
root: { | ||
name: "root", | ||
children: roots.map(({ id, root }) => ({ name: id, children: root.children })) | ||
} | ||
} | ||
]; | ||
} | ||
const html = await buildStats(title, roots, template); | ||
@@ -100,0 +114,0 @@ |
@@ -47,2 +47,4 @@ # Rollup Plugin Visualizer | ||
`bundlesRelative` (boolean, default `false`) - Combine all bundles to one diagram | ||
## Build plugin | ||
@@ -49,0 +51,0 @@ |
1227958
11906
59