mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
codeSplitting:false inlined every lazy()/dynamic import into the entry, so the whole 28.5 MB bundle — including 19 MB of shiki grammars and 3.1 MB of mermaid that nothing rendered — was parsed and evaluated on every cold start. The original single-chunk rationale (#38888: electron-builder OOMs scanning shiki's thousands of default chunks) doesn't require ONE chunk, just few: rolldown advancedChunks groups keep the file count at ~180. Ordering matters and is the subtle part: shared foundations (react, hast/ mdast utils, lodash-es/d3 commons) must match BEFORE the heavy groups, because rolldown merges an unmatched shared module INTO the heavy chunk that uses it — and then the entry statically imports 19 MB of shiki just to reach react, putting the whole chunk back on the boot path. Statically-reachable boot graph: 26.9 MB -> 7.7 MB. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||