diff --git a/package.json b/package.json index 8fad4987862..cf88dc1ed18 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,8 @@ "build:es6": "rollup -c --environment target:es6", "build:profiler": "rollup -c --environment target:profiler", "build:treemap": "npm run build:es5 -- --environment treemap", + "build:treenet": "npm run build:es5 -- --environment treenet", + "build:treesun": "npm run build:es5 -- --environment treesun", "build:types": "npm run build:dts && node types-fixup.mjs && rollup -c --environment target:types && node types-undollar.mjs", "build:sourcemaps": "npm run build -- -m", "build:publish": "npm run build && npm run build:types", diff --git a/rollup.config.js b/rollup.config.js index e19a48142d2..af3421491c0 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -163,11 +163,26 @@ function buildTarget(buildType, moduleFormat) { if (process.env.treemap) { outputPlugins.min.push(visualizer({ + filename: 'treemap.html', brotliSize: true, gzipSize: true })); } + if (process.env.treenet) { + outputPlugins.min.push(visualizer({ + filename: 'treenet.html', + template: 'network' + })); + } + + if (process.env.treesun) { + outputPlugins.min.push(visualizer({ + filename: 'treesun.html', + template: 'sunburst' + })); + } + const outputFile = { debug: 'build/playcanvas.dbg', release: 'build/playcanvas',