cloudflare / cloudflare/vinext
Track parallel-route page CSS isolation in App Router manifest
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
## Summary
PR #1738 moves matched App Router page modules and intercepting route page modules behind lazy dynamic imports so sibling page-level global CSS does not leak into the shared RSC manifest chunk.
One remaining gap is non-intercepting parallel-route page modules: `slot.pagePath` entries in `packages/vinext/src/entries/app-rsc-manifest.ts` still use the static import path. A parallel-route page that imports route-global CSS can still contribute that CSS to the shared manifest chunk, which is the same class of leak fixed for ordinary matched pages in #1738.
## Expected behavior
Parallel-route page modules should only load when the parallel route is active, matching the isolation behavior for matched page modules and intercepting route page modules.
## Notes
This was identified during review of #1738 and treated as out of scope for that PR because the current fixtures exercise an intercepting `@modal` page, not a non-intercepting parallel slot page.
A useful regression test would add a non-intercepting parallel slot page that imports route-global CSS, then assert that unrelated routes do not link or apply that CSS in production.
Contributor guide
Assessment
This issue has not been assessed yet.