fix(react-start-rsc): require @vitejs/plugin-rsc >=0.5.30 for route component HMR - #7900
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR raises ChangesReact Start RSC plugin update
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
View your CI Pipeline Execution ↗ for commit 4edd5d1
☁️ Nx Cloud last updated this comment at |
Merging this PR will degrade performance by 29.26%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem server error-paths unmatched (react) |
264.5 KB | 699.7 KB | -62.19% |
| ❌ | Memory | mem server serialization-payload (solid) |
3.4 MB | 6.1 MB | -43.84% |
| ❌ | Memory | mem server error-paths not-found (vue) |
383.2 KB | 426.1 KB | -10.06% |
| ❌ | Memory | mem client navigation-churn (vue) |
991.5 KB | 1,029.9 KB | -3.74% |
| ❌ | Simulation | client-async-pipeline navigation loop (react) |
49.8 ms | 51.7 ms | -3.65% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing sreetamdas:fix/rsc-bump-plugin-rsc-floor (4edd5d1) with main (88f366a)
Footnotes
-
13 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. ↩
Description
Raises the
@vitejs/plugin-rscfloor past the range that breaks dev-mode HMR for RSC routes, and updates the lockfile so the workspace actually installs a fixed version.Closes #7618.
Why
@vitejs/plugin-rsc0.5.20 - 0.5.29suppress client HMR for a route component co-located with acreateServerFn. The route file is in therscmodule graph, and the plugin's clienthotUpdatereturned[]for any file in that graph without a"use client"boundary — a guard meant to stop server-only files watched as style deps (Tailwind,addWatchFile) from forcing full reloads. A genuine client route component co-located with a server fn got caught by it, so editing the component produced an(rsc) hmr update …?tss-serverfn-splitand no client update at all: no DOM change, no reload.Fixed upstream in vitejs/vite-plugin-react#1248, released in
@vitejs/plugin-rsc@0.5.30. The guard now only bails when the changed module has no non-CSS client importer, so CSS/style-dep reloads behave as before.Since co-locating a server function with its route component is an idiomatic Start pattern, the current
>=0.5.20peer range lets users land on a version where that pattern silently breaks Fast Refresh.Changes
packages/react-start-rsc— peer@vitejs/plugin-rsc>=0.5.20→>=0.5.30, dev^0.5.20→^0.5.30e2e/react-start/rsc,e2e/react-start/rsc-query,e2e/react-start/rsc-deferred-hydration,examples/react/start-rscs— dev^0.5.20→^0.5.30pnpm-lock.yamlregenerated — it pinned0.5.20, so the range bumps alone would not have changed what installs@tanstack/react-start-rscNo source changes.
Verification
Against the reproducer from #7618, with the browser HMR socket confirmed connected before each run:
0.5.270.5.30(rsc) hmr update …?tss-serverfn-splitonly(client) hmr update /src/routes/index.tsx, …?tsr-split=component+ the rsc lineAlso confirmed on a real Start RSC app, and that the guard's original purpose still holds: a co-located route importing a CSS module still Fast Refreshes, and a CSS-only edit still hot-swaps styles without a full reload.
Notes
@vitejs/plugin-rscchangelog between0.5.20and0.5.30, so the floor raise should be a cheap upgrade for consumers.@vitejs/plugin-rscstaysoptional: trueinpeerDependenciesMeta, so the range is only validated when it is actually installed.packages/react-start/package.jsonlists@vitejs/plugin-rscinpeerDependenciesMetawith no matchingpeerDependenciesentry.Summary by CodeRabbit
Bug Fixes
Documentation