Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* treemap - Enable treemap build visualization (release only).
* treenet - Enable treenet build visualization (release only).
* treesun - Enable treesun build visualization (release only).
* treeflame - Enable treeflame build visualization (release only).
*/

import { execSync } from 'child_process';
Expand All @@ -22,7 +23,8 @@ const ENV_START_MATCHES = [
'target',
'treemap',
'treenet',
'treesun'
'treesun',
'treeflame'
];

const env = [];
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"build:treemap": "npm run build target:release treemap",
"build:treenet": "npm run build target:release treenet",
"build:treesun": "npm run build target:release treesun",
"build:treeflame": "npm run build target:release treeflame",
"build:sourcemaps": "npm run build -- -m",
"watch": "npm run build -- -w",
"watch:release": "npm run build target:release -- -w",
Expand Down
7 changes: 7 additions & 0 deletions utils/rollup-build-target.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ function getOutPlugins(type) {
}));
}

if (process.env.treeflame) {
plugins.push(visualizer({
filename: `treeflame.${type}.html`,
template: 'flamegraph'
}));
}

return plugins;
}

Expand Down