Skip to content

fix(react-start-rsc): require @vitejs/plugin-rsc >=0.5.30 for route component HMR - #7900

Merged
schiller-manuel merged 1 commit into
TanStack:mainfrom
sreetamdas:fix/rsc-bump-plugin-rsc-floor
Jul 25, 2026
Merged

fix(react-start-rsc): require @vitejs/plugin-rsc >=0.5.30 for route component HMR#7900
schiller-manuel merged 1 commit into
TanStack:mainfrom
sreetamdas:fix/rsc-bump-plugin-rsc-floor

Conversation

@sreetamdas

@sreetamdas sreetamdas commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

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.30
  • e2e/react-start/rsc, e2e/react-start/rsc-query, e2e/react-start/rsc-deferred-hydration, examples/react/start-rscs — dev ^0.5.20^0.5.30
  • pnpm-lock.yaml regenerated — it pinned 0.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-rsc changelog between 0.5.20 and 0.5.30, so the floor raise should be a cheap upgrade for consumers.
  • @vitejs/plugin-rsc stays optional: true in peerDependenciesMeta, 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.json lists @vitejs/plugin-rsc in peerDependenciesMeta with no matching peerDependencies entry.

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.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​vitejs/​plugin-rsc@​0.5.309910010097100

View full report

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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 88f366a and 4edd5d1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .changeset/thick-jars-listen.md
  • e2e/react-start/rsc-deferred-hydration/package.json
  • e2e/react-start/rsc-query/package.json
  • e2e/react-start/rsc/package.json
  • examples/react/start-rscs/package.json
  • packages/react-start-rsc/package.json

📝 Walkthrough

Walkthrough

The PR raises @vitejs/plugin-rsc requirements to 0.5.30 for @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.md
The package’s development and peer dependency constraints are raised to @vitejs/plugin-rsc 0.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.json
RSC 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-start

Suggested 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-rsc minimum 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 4edd5d1

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:26 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 25, 2026

Copy link
Copy Markdown
More templates

@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@7900

commit: 4edd5d1

@codspeed-hq

codspeed-hq Bot commented Jul 25, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 29.26%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 5 regressed benchmarks
✅ 162 untouched benchmarks
⏩ 13 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

Footnotes

  1. 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.

@schiller-manuel
schiller-manuel merged commit fc83c03 into TanStack:main Jul 25, 2026
22 of 26 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TanStack Start (RSC): route component does not HMR when its file has a co-located createServerFn

2 participants