Skip to content

Commit b00963d

Browse files
committed
fix: attach per-chunk modules to split-shell rows
The split-shell runtime and signals rows were sharing the full application module list. Each row's meta.modules now reflects only the modules present in its own chunk, so reachability diffs correctly attribute modules to the runtime chunk versus the signals chunk. The full-app row keeps using the complete module list.
1 parent e9d2902 commit b00963d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎benchmarks/bundle-size/run-minimal.mjs‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,16 @@ async function buildSplitScenario(scenario, entry) {
486486
executable: await linkChunks(chunks, entryChunk),
487487
rows: [
488488
{ name: scenario.name, files },
489-
{ name: `${scenario.name}-runtime`, files: [runtime.code] },
490-
{ name: `${scenario.name}-signals`, files: [signals.code] },
489+
{
490+
name: `${scenario.name}-runtime`,
491+
files: [runtime.code],
492+
modules: Object.keys(runtime.modules),
493+
},
494+
{
495+
name: `${scenario.name}-signals`,
496+
files: [signals.code],
497+
modules: Object.keys(signals.modules),
498+
},
491499
],
492500
modules,
493501
runtimeExports: runtime.modules[runtimeModule].renderedExports,
@@ -842,7 +850,7 @@ try {
842850
Object.entries(measured).map(([metric, value]) => [metric, stat(value)]),
843851
),
844852
meta: {
845-
modules: modules.map((id) =>
853+
modules: (row.modules ?? modules).map((id) =>
846854
id.startsWith(repository + path.sep) ? path.relative(repository, id) : id,
847855
),
848856
hasRuntime,

0 commit comments

Comments
 (0)