Repository navigation
fix(start-plugin-core): preload transitive static imports and fix Rsbuild shared-chunk CSS - #8695
Conversation
🦋 Changeset detectedLatest commit: 504f08f The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Route preloads now include the full chain of static imports, and Rsbuild shared-chunk CSS is limited to dependencies the route actually uses. Tests cover both changes, and no concrete regression was identified, so this is ready to merge. Pre-merge checks ·
|
…uild shared-chunk CSS Route preloads read a chunk's `imports` as a complete list, which only holds when the bundler hoists transitive imports. Walk the static import graph instead, and derive Rsbuild chunk imports from the module graph rather than chunk-group siblings so shared chunks stop attaching unrelated route CSS to the SSR response. Fixes #8415 Fixes #8511
…s and CSS The manifest builder walked the static import graph twice, once breadth-first for preloads and once recursively for stylesheets. A single memoized depth-first walk now records discovered file names for preloads and chunks in post-order for stylesheets, which also keeps every chunk in an import cycle seeing the whole cycle instead of a partially cached result. The Rsbuild adapter resolved static dependency chunks again for every CSS-only chunk reached from each importer; the resolution is now memoized per chunk. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1420d00 to
6e3bda7
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Rollup is no longer a supported client bundler, so the `imports` contract is described in terms of the direct-imports-only lists Rolldown and Rsbuild emit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit 504f08f
☁️ Nx Cloud last updated this comment at |
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
🚀 Changeset Version Preview14 package(s) bumped directly, 9 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
Merging this PR will improve performance by 3.61%ℹ️ 3 benchmarks have no flame graph
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Memory | mem client navigation-churn (solid) |
95 KB | 91.6 KB | +3.61% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/start-manifest-static-import-closure (504f08f) with main (f243c61)
Footnotes
-
3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
🎯 Changes
importson a normalized client chunk was read as a complete list when building route preloads, but walked as a graph everywhere else. Rolldown and Rsbuild list direct imports only, so a route lost every second-levelmodulepreload, and with Rsbuild shared chunks the sibling-based import list carried unrelated route CSS into the SSR response or dropped the shared CSS.manifestBuilder.ts: one memoized depth-first walk over the static import graph now serves both preloads (discovery order) and stylesheets (dependencies first), replacing the flatimportsread for preloads and the separate recursive CSS collector. Each chunk in an import cycle now sees the whole cycle instead of a partially cached result.rsbuild/normalized-client-build.ts: deriveimportsfrom active module dependencies instead of chunk-group siblings, including concatenated modules and CSS-only chunks. Based on fix(start): collect Rsbuild SSR styles from static dependencies #8466 by @SyMind. Static dependency resolution is memoized per chunk.importscontract onNormalizedClientChunk.Fixes #8415, fixes #8511.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit