Files
openchamber/packages
Cursor AgentandSerhii Dziupin 3d27c0a0ca perf(build): fix bun .bun chunk parsing and isolate Vite preload helper
The manualChunks package-name parser used the first node_modules/ segment,
which under bun's isolated install (.bun/<pkg>@<ver>/node_modules/<pkg>) is
always '.bun'. This collapsed nearly every dependency — including lazy-only
heavy libs (Shiki langs/themes, transformers, katex, mermaid, elkjs, etc.) —
into one 18.5 MB eager 'vendor-.bun' chunk, defeating all code splitting.

- Resolve the real package from the LAST node_modules/ segment.
- Pin Vite's __vitePreload helper to its own chunk so Rollup stops
  co-locating it inside vendor-shiki and dragging Shiki core + the 629 KB
  oniguruma engine into the eager bootstrap.
- Drop the now-dead react-syntax-highlighter chunk rule.

Eager bootstrap graph drops from ~18.5 MB to ~0.44 MB.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
2026-06-26 11:26:11 +00:00
..
2026-06-24 19:15:26 +03:00