fix(react-start-rsc): require @vitejs/plugin-rsc >=0.5.30 for route component HMR #7900
main fromrefs/pull/7900/head·merged by schiller-manuel(GitHub profile, opens in a new tab) Description#
Raises the @vitejs/plugin-rsc floor 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-rsc 0.5.20 - 0.5.29 suppress client HMR for a route component co-located with a createServerFn. The route file is in the rsc module graph, and the plugin's client hotUpdate returned [] 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-split and 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.20 peer 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- patch changeset for
@tanstack/react-start-rsc
No source changes.
Verification#
Against the reproducer from #7618, with the browser HMR socket confirmed connected before each run:
0.5.27 | 0.5.30 | |
|---|---|---|
| terminal | (rsc) hmr update …?tss-serverfn-split only | (client) hmr update /src/routes/index.tsx, …?tsr-split=component + the rsc line |
| DOM | unchanged | updated |
| client state | — | preserved (Fast Refresh, not a reload) |
Also 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#
- There are no breaking changes in the
@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.- Happy to drop the floor raise and keep just the lockfile/devDependency updates if you would rather not move the peer minimum — the issue is resolved either way by upgrading the plugin.
- Unrelated and left alone:
packages/react-start/package.jsonlists@vitejs/plugin-rscinpeerDependenciesMetawith no matchingpeerDependenciesentry.
Summary by CodeRabbit#
Bug Fixes
- Restored client hot module reloading for route components colocated with server functions.
- Updated the supported RSC tooling version to ensure the fix is available.
Documentation
- Added release notes describing the hot reload fix and updated compatibility requirement.
- 1
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
b36b86b1-a174-4761-92a1-cf58b5cd48ca📥 Commits
Reviewing files that changed from the base of the PR and between 88f366ab8e049b23341f7dcea96c5065f630c31f and 4edd5d1ab79f3e879af1e24598b0a0c724e886a7.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
.changeset/thick-jars-listen.mde2e/react-start/rsc-deferred-hydration/package.jsone2e/react-start/rsc-query/package.jsone2e/react-start/rsc/package.jsonexamples/react/start-rscs/package.jsonpackages/react-start-rsc/package.json
📝 Walkthrough
Walkthrough#
The PR raises
@vitejs/plugin-rscrequirements to0.5.30for@tanstack/react-start-rsc, updates related RSC examples and end-to-end fixtures, and adds a patch changeset documenting the HMR fix.Changes#
React Start RSC plugin update
Layer / File(s) Summary Plugin requirement and release note
packages/react-start-rsc/package.json,.changeset/thick-jars-listen.mdThe package’s development and peer dependency constraints are raised to @vitejs/plugin-rsc0.5.30, with a patch changeset documenting the updated requirement and HMR fix.Fixture plugin versions
e2e/react-start/rsc-*/package.json,examples/react/start-rscs/package.jsonRSC end-to-end fixtures and the example update their development dependency to ^0.5.30.Estimated code review effort: 1 (Trivial) | ~3 minutes
Suggested labels:
package: react-startSuggested reviewers:
schiller-manuel🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled. Title check ✅ Passed The title accurately captures the main change: raising the @vitejs/plugin-rscminimum to 0.5.30 to fix route component HMR in react-start-rsc.Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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 `@coderabbitai help` to get the list of available commands.View your CI Pipeline Execution ↗ for commit 4edd5d1ab79f3e879af1e24598b0a0c724e886a7
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 11m 39s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 2m 19s View ↗
☁️ Nx Cloud last updated this comment at
2026-07-25 21:34:26UTCMore templates
- tanstack-router-react-example-authenticated-routes
- tanstack-router-react-example-authenticated-routes-firebase
- tanstack-router-react-example-basic
- tanstack-router-react-example-basic-default-search-params
- tanstack-router-react-example-basic-devtools-panel
- tanstack-router-react-example-basic-file-based
- tanstack-router-react-example-basic-non-nested-devtools
- tanstack-router-react-example-react-query
- tanstack-router-react-example-basic-react-query-file-based
- tanstack-router-react-example-basic-ssr-file-based
- tanstack-router-react-example-basic-ssr-streaming-file-based
- tanstack-router-react-example-basic-virtual-file-based
- tanstack-router-react-example-basic-virtual-inside-file-based
- tanstack-router-react-example-deferred-data
- tanstack-router-i18n-paraglide
- tanstack-router-react-example-kitchen-sink
- tanstack-router-react-example-kitchen-sink-file-based
- tanstack-router-react-example-kitchen-sink-react-query
- tanstack-router-react-example-kitchen-sink-react-query-file-based
- tanstack-router-react-example-large-file-based
- tanstack-router-react-example-location-masking
- tanstack-router-react-example-navigation-blocking
- tanstack-router-react-example-quickstart
- tanstack-router-react-example-quickstart-esbuild-file-based
- tanstack-router-react-example-quickstart-file-based
- tanstack-router-react-example-quickstart-rspack-file-based
- tanstack-router-react-example-quickstart-webpack-file-based
- router-monorepo-react-query
- router-mono-simple
- router-mono-simple-lazy
- tanstack-router-react-example-scroll-restoration
- tanstack-search-validator-adapters
- tanstack-start-example-bare
- tanstack-start-example-basic
- tanstack-start-example-basic-auth
- tanstack-router-react-example-basic-authjs
- tanstack-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- tanstack-start-example-basic-rsbuild
- tanstack-start-example-basic-static
- tanstack-start-bun-hosting
- tanstack-start-example-clerk-basic
- tanstack-start-example-convex-trellaux
- tanstack-start-example-counter
- tanstack-start-i18n-paraglide
- tanstack-start-example-large
- tanstack-start-example-material-ui
- tanstack-start-example-rscs
- tanstack-start-streaming-data-from-server-functions
- tanstack-start-example-supabase-basic
- tanstack-start-tailwind-v4
- tanstack-start-example-trellaux
- tanstack-start-example-workos
- tanstack-router-react-example-view-transitions
- tanstack-router-react-example-with-framer-motion
- tanstack-router-react-example-with-trpc
- tanstack-router-react-example-with-trpc-react-query
- tanstack-router-solid-example-authenticated-routes
- tanstack-router-solid-example-authenticated-routes-firebase
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-default-search-params
- tanstack-router-solid-example-basic-devtools-panel
- tanstack-router-solid-example-basic-file-based
- tanstack-router-solid-example-basic-non-nested-devtools
- tanstack-router-solid-example-basic-solid-query
- tanstack-router-solid-example-basic-solid-query-file-based
- tanstack-router-solid-example-basic-ssr-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-basic-virtual-file-based
- tanstack-router-solid-example-basic-virtual-inside-file-based
- tanstack-router-solid-example-deferred-data
- tanstack-router-solid-i18n-paraglide
- tanstack-router-solid-example-kitchen-sink
- tanstack-router-solid-example-kitchen-sink-file-based
- tanstack-router-solid-example-kitchen-sink-solid-query
- tanstack-router-solid-example-kitchen-sink-solid-query-file-based
- tanstack-router-solid-example-large-file-based
- tanstack-router-solid-example-location-masking
- tanstack-router-solid-example-navigation-blocking
- tanstack-router-solid-example-quickstart
- tanstack-router-solid-example-quickstart-esbuild-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-router-solid-example-quickstart-rspack-file-based
- tanstack-router-solid-example-quickstart-webpack-file-based
- @tanstack/router-solid-mono-simple
- router-solid-mono-simple-lazy
- router-solid-monorepo-solid-query
- tanstack-router-solid-example-scroll-restoration
- tanstack-solid-router-search-validator-adapters
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-authjs
- tanstack-solid-start-example-basic-cloudflare
- tanstack-solid-start-example-basic-netlify
- tanstack-solid-start-example-basic-nitro
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-solid-start-bun-hosting
- tanstack-solid-start-example-convex-better-auth
- tanstack-solid-start-example-counter
- tanstack-solid-start-i18n-paraglide
- tanstack-solid-start-example-large
- tanstack-solid-start-streaming-data-from-server-functions
- tanstack-solid-start-example-supabase-basic
- tanstack-solid-start-tailwind-v4
- tanstack-router-solid-example-view-transitions
- tanstack-router-solid-example-with-framer-motion
- tanstack-router-solid-example-with-trpc
- tanstack-router-vue-example-basic-jsx
- tanstack-router-vue-example-basic-file-based-jsx
- tanstack-router-vue-example-basic-file-based-sfc
@tanstack/arktype-adapter
npm i https://pkg.pr.new/@tanstack/arktype-adapter@7900@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7900@tanstack/eslint-plugin-start
npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7900@tanstack/history
npm i https://pkg.pr.new/@tanstack/history@7900@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7900@tanstack/react-router
npm i https://pkg.pr.new/@tanstack/react-router@7900@tanstack/react-router-devtools
npm i https://pkg.pr.new/@tanstack/react-router-devtools@7900@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7900@tanstack/react-start
npm i https://pkg.pr.new/@tanstack/react-start@7900@tanstack/react-start-client
npm i https://pkg.pr.new/@tanstack/react-start-client@7900@tanstack/react-start-rsc
npm i https://pkg.pr.new/@tanstack/react-start-rsc@7900@tanstack/react-start-server
npm i https://pkg.pr.new/@tanstack/react-start-server@7900@tanstack/router-cli
npm i https://pkg.pr.new/@tanstack/router-cli@7900@tanstack/router-core
npm i https://pkg.pr.new/@tanstack/router-core@7900@tanstack/router-devtools
npm i https://pkg.pr.new/@tanstack/router-devtools@7900@tanstack/router-devtools-core
npm i https://pkg.pr.new/@tanstack/router-devtools-core@7900@tanstack/router-generator
npm i https://pkg.pr.new/@tanstack/router-generator@7900@tanstack/router-plugin
npm i https://pkg.pr.new/@tanstack/router-plugin@7900@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7900@tanstack/router-utils
npm i https://pkg.pr.new/@tanstack/router-utils@7900@tanstack/router-vite-plugin
npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7900@tanstack/solid-router
npm i https://pkg.pr.new/@tanstack/solid-router@7900@tanstack/solid-router-devtools
npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7900@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7900@tanstack/solid-start
npm i https://pkg.pr.new/@tanstack/solid-start@7900@tanstack/solid-start-client
npm i https://pkg.pr.new/@tanstack/solid-start-client@7900@tanstack/solid-start-server
npm i https://pkg.pr.new/@tanstack/solid-start-server@7900@tanstack/start-client-core
npm i https://pkg.pr.new/@tanstack/start-client-core@7900@tanstack/start-fn-stubs
npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7900@tanstack/start-plugin-core
npm i https://pkg.pr.new/@tanstack/start-plugin-core@7900@tanstack/start-server-core
npm i https://pkg.pr.new/@tanstack/start-server-core@7900@tanstack/start-static-server-functions
npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7900@tanstack/start-storage-context
npm i https://pkg.pr.new/@tanstack/start-storage-context@7900@tanstack/valibot-adapter
npm i https://pkg.pr.new/@tanstack/valibot-adapter@7900@tanstack/virtual-file-routes
npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7900@tanstack/vue-router
npm i https://pkg.pr.new/@tanstack/vue-router@7900@tanstack/vue-router-devtools
npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7900@tanstack/vue-router-ssr-query
npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7900@tanstack/vue-start
npm i https://pkg.pr.new/@tanstack/vue-start@7900@tanstack/vue-start-client
npm i https://pkg.pr.new/@tanstack/vue-start-client@7900@tanstack/vue-start-server
npm i https://pkg.pr.new/@tanstack/vue-start-server@7900@tanstack/zod-adapter
npm i https://pkg.pr.new/@tanstack/zod-adapter@7900commit:
4edd5d1Merging this PR will degrade performance by 29.26%#
:warning: Different runtime environments detected
Some benchmarks with significant performance changes were compared across different runtime environments, which may affect the accuracy of the results.
❌ 5regressed benchmarks✅ 162untouched benchmarks⏩ 13skipped benchmarks1Warning
Please fix the performance issues or acknowledge them on CodSpeed.
Performance Changes#
Mode Benchmark BASEHEADEfficiency ❌ 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 regressionon this PR, or directly use the CodSpeed MCP with your agent.
Comparingsreetamdas:fix/rsc-bump-plugin-rsc-floor(4edd5d1) withmain(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. ↩
-
Sign in to join this conversation.
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
Security
View full report