fix(start-plugin-core): restore per route stylesheets on Windows - #8202
fix(start-plugin-core): restore per route stylesheets on Windows#8202czearing wants to merge 1 commit into
Conversation
…tart manifest Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughRsbuild now normalizes Rspack route module paths to POSIX separators. New tests verify Windows route chunk matching and manifest stylesheet and preload entries. A patch changeset documents the fix. ChangesWindows route manifest
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change restores route-specific stylesheets and preloads on Windows without altering behavior on other platforms; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎯 Changes
The Rsbuild integration keys route chunks by the module path rspack reports, which uses the OS separator, while the generated route tree stores every route path with forward slashes, so on Windows every manifest lookup misses and each route is pruned from the Start manifest without its stylesheets or preloads.
Route paths are now converted to the POSIX form before they become manifest keys, which restores each route's own
cssandpreloadsand puts the route stylesheet back in the render blocking head. Linux and macOS are unaffected, since both sides of the lookup already agree there.This was found on a production Rsbuild build of a Start app on Windows. The served page carried only the root stylesheet, painted unstyled for roughly 286 ms, and reflowed once the route styles arrived. With the change the same route ships its stylesheets in the head and that unstyled window is gone.
Validation: a new unit test drives the Rsbuild build normalizer and the manifest builder with Windows style module paths, it fails on the current code and passes with the fix, and the package unit suite reports no new failures.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests