feat: split vendor bundles with cycle-safe manual chunks #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/build-code-splitting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Introduces a
manualChunksstrategy that carves vendor code into cacheable chunks and lazy-loads heavy route panels. Renders the React tree before the init-error IPC resolves so a hung backend can no longer blank the window.Blank-page regression fixed
The chunking work shipped a circular chunk dependency: loose
id.includesmatchers pulled@floating-ui/react*intovendor-reactwhile their deps stayed invendor, leaving React's exports undefined at module load (Cannot read properties of undefined (reading 'useLayoutEffect')). Fixes:/node_modules/<pkg>/package boundariescmdkco-located with the Radix layer it depends on (broke a second latentvendor⇄vendor-radixcycle)Guardrail
Adds
assertNoCircularChunks— a build-time Vite plugin that fails the build on any circular chunk dependency, so this class of bug surfaces in CI instead of as a white screen.Tests
tests/unit/manualChunks.test.ts— chunk routing, incl. cycle regressionstests/unit/assertNoCircularChunks.test.ts— cycle-detection guardtests/integration/mainBootstrap.test.tsx— bootstrap renders even when init-error IPC hangsFull suite: 70 files, 465 passed / 1 skipped. Typecheck clean. Built bundle verified to render in-browser.
🤖 Generated with Claude Code