Skip to content

Commit 76342f2

Browse files
Flatten webui-press page script wrappers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ef3451 commit 76342f2

2 files changed

Lines changed: 336 additions & 19 deletions

File tree

crates/webui-press/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,9 @@ import "@mai-ui/button/define.js";
409409
</script>
410410
```
411411

412-
The template chrome uses a shared root script (`index.js`). Pages with no page-specific component scripts or bundled imports load only that root script. Pages with identical page-specific import sets reuse the same generated page entry instead of emitting duplicate wrappers.
412+
The template chrome uses a shared root script (`index.js`). Pages with no page-specific component scripts or bundled imports load only that root script. Pages with identical page-specific import sets reuse the same generated import group instead of emitting duplicate wrappers.
413413

414-
All root and page entries are bundled in one esbuild build. If ten pages import the same package or local component runtime, esbuild can emit that dependency once as a shared chunk and have the entry files import it.
414+
All root and page entries are bundled in one esbuild build. If ten pages import the same package or local component runtime, esbuild can emit that dependency once as a shared chunk. Import-only page wrappers are collapsed after bundling, so generated pages link directly to the chunks they need instead of loading a `page-N.js` file that only re-imports the same chunks.
415415

416416
`webui-press build` minifies bundled JavaScript. `webui-press serve` skips minification for faster rebuilds during local development.
417417

0 commit comments

Comments
 (0)