fix(rsc): remove outdated stale hmr css references #7219
main fromrefs/pull/7219/head·opened follow-up to https://github.com/vitejs/vite-plugin-react/pull/1188 on the TanStack Router side where @schiller-manuel was already mentioned
While debugging CSS HMR in TanStack Start RSC (https://tanstack.com/blog/react-server-components) I noticed a second, independent problem: <link rel="stylesheet"> tags pile up in <head> across HMR edits.. Every save appends another <link> and none of them get cleaned up
CompositeComponent and RscNodeRenderer both walk the cssHrefs set reported by the RSC Flight stream and call:
ReactDOM.preinit(href, { as: 'style', precedence: 'high' })
Obviously this is a dev only problem. Vite appends an HMR cache-bust (?t=<lastHMRTimestamp>) to every CSS href on every edit (see vite-plugin-react #1188. Each edit therefore calls preinit with a different href which adds a new <link> to <head> instead of replacing the previous one
A simple possible fix would be to skip these HMR css requests by excluding css files with /[?&]t=\d+/ as Vite only emits that query in dev so:
- Prod path is unchanged
- Dev path cache-busted hrefs are ignored
One open question: can we somehow add HMR e2e tests to verify:
- changing a css prop updates with hmr
- removing a css prop reverts the css value to the default
Summary by CodeRabbit#
Refactor
- Streamlined stylesheet pre-initialization: production preinit retained; dev skips preinit to avoid stale CSS during HMR.
New Features
- Added example app with routes, navigation, server-rendered demo cards (global CSS and CSS Modules), dev tooling, and Vite/RSC config.
- Added ESLint config and .gitignore for the example.
Tests
- Added Playwright e2e tests for CSS HMR, hydration helper, and test setup/teardown.
Chores
- Bumped dev tool version and added a changeset entry.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-start-rsc
Bundle Size Benchmarks#
- Commit:
ee96e25d1487 - Measured at:
2026-05-06T16:43:11.457Z - Baseline source:
history:35e88f04996d - Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend react-router.minimal87.16 KiB +7 B (+0.01%) 273.95 KiB 75.71 KiB ▁▁▁▁▁▁▁▁▁▁▁█ react-router.full90.69 KiB +6 B (+0.01%) 285.45 KiB 78.79 KiB ▁▁▁▁▁▁▁▁▁▁▁█ solid-router.minimal35.38 KiB 0 B (0.00%) 106.25 KiB 31.81 KiB ▅▅▅▅▅▅▅▅▅▅▅ solid-router.full40.10 KiB -2 B (-0.00%) 120.46 KiB 36.02 KiB ███████████▁ vue-router.minimal52.86 KiB -300 B (-0.55%) 150.28 KiB 47.50 KiB ███████████▁ vue-router.full58.15 KiB -128 B (-0.21%) 167.01 KiB 52.14 KiB ███████████▁ react-start.minimal101.84 KiB +4 B (+0.00%) 322.38 KiB 88.14 KiB ▁▁▁▁▁▁▁▁▁▁██ react-start.full105.27 KiB -2 B (-0.00%) 332.71 KiB 90.99 KiB ▁▁▁▁▁▁▁▁▁▁██ react-start.rsbuild.minimal99.43 KiB 0 B (0.00%) 316.76 KiB 85.51 KiB ▁▁▁▁▁▁▁▁▁▁█ react-start.rsbuild.full102.72 KiB 0 B (0.00%) 327.19 KiB 88.31 KiB ▁▁▁▁▁▁▁▁▁▁█ solid-start.minimal49.48 KiB -2 B (-0.00%) 152.35 KiB 43.64 KiB ▁▁▁▁▁▁▁▁▁▁██ solid-start.full55.27 KiB +2 B (+0.00%) 169.25 KiB 48.64 KiB ▁▁▁▁▁▁▁▁▁▁██ Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.
- Commit:
🧹 Nitpick comments (1)
packages/react-start-rsc/tests/preinitCssHrefs.test.ts (1)
31-93: Good coverage — consider one additional assertion for HMR skip ordering.The suite covers the important cases (positive match, negative match, mixed, undefined/empty,
ReadonlySet). ThetoHaveBeenNthCalledWithassertions on lines 67-74 already implicitly verify that cache-busted entries don't shift the call order, so this is solid.Optional nit: the
beforeEach/afterEachmockRestorepattern works, butvi.restoreAllMocks()in a top-levelafterEach(or configuringrestoreMocks: truein vitest config) would let you drop thepreinitSpyvariable declaration and the explicit restore. Not a blocker.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/react-start-rsc/tests/preinitCssHrefs.test.ts` around lines 31 - 93, Add an explicit assertion that cache-busted HMR-style hrefs are skipped without affecting the relative ordering of non-cache-busted hrefs: update the mixed-list test that calls preinitCssHrefs(...) to include an assertion on the exact call order of ReactDOM.preinit (preinitSpy) for the non-cache-busted entries so order is validated (or add a new test that supplies interleaved cache-busted and non-cache-busted hrefs and asserts preinitSpy was called in the original relative order). Optionally simplify mock cleanup by replacing the beforeEach/afterEach preinitSpy + preinitSpy.mockRestore() pattern with a single afterEach(() => vi.restoreAllMocks()) and remove the preinitSpy variable if you prefer.🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Nitpick comments: In `@packages/react-start-rsc/tests/preinitCssHrefs.test.ts`: - Around line 31-93: Add an explicit assertion that cache-busted HMR-style hrefs are skipped without affecting the relative ordering of non-cache-busted hrefs: update the mixed-list test that calls preinitCssHrefs(...) to include an assertion on the exact call order of ReactDOM.preinit (preinitSpy) for the non-cache-busted entries so order is validated (or add a new test that supplies interleaved cache-busted and non-cache-busted hrefs and asserts preinitSpy was called in the original relative order). Optionally simplify mock cleanup by replacing the beforeEach/afterEach preinitSpy + preinitSpy.mockRestore() pattern with a single afterEach(() => vi.restoreAllMocks()) and remove the preinitSpy variable if you prefer.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
9fe7e78c-fd22-4676-962f-e436b8c8a27e📥 Commits
Reviewing files that changed from the base of the PR and between c19571fd5de0e4544206d92c1d84e4e8c455f1fb and 066c6580fcd813c8aca2af9680bc1dc9322237d1.
📒 Files selected for processing (4)
packages/react-start-rsc/src/CompositeComponent.tsxpackages/react-start-rsc/src/RscNodeRenderer.tsxpackages/react-start-rsc/src/preinitCssHrefs.tspackages/react-start-rsc/tests/preinitCssHrefs.test.ts
View your CI Pipeline Execution ↗ for commit 1fec5dd5cf5fa41b3ef2f314a8caf53798b31756
☁️ Nx Cloud last updated this comment at
2026-05-31 21:54:02UTCMore templates
- tanstack-router-vue-example-basic-jsx
- tanstack-router-vue-example-basic-file-based-jsx
- tanstack-router-vue-example-basic-file-based-sfc
- 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-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/arktype-adapter
npm i https://pkg.pr.new/@tanstack/arktype-adapter@7219@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7219@tanstack/eslint-plugin-start
npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7219@tanstack/history
npm i https://pkg.pr.new/@tanstack/history@7219@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7219@tanstack/react-router
npm i https://pkg.pr.new/@tanstack/react-router@7219@tanstack/react-router-devtools
npm i https://pkg.pr.new/@tanstack/react-router-devtools@7219@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7219@tanstack/react-start
npm i https://pkg.pr.new/@tanstack/react-start@7219@tanstack/react-start-client
npm i https://pkg.pr.new/@tanstack/react-start-client@7219@tanstack/react-start-rsc
npm i https://pkg.pr.new/@tanstack/react-start-rsc@7219@tanstack/react-start-server
npm i https://pkg.pr.new/@tanstack/react-start-server@7219@tanstack/router-cli
npm i https://pkg.pr.new/@tanstack/router-cli@7219@tanstack/router-core
npm i https://pkg.pr.new/@tanstack/router-core@7219@tanstack/router-devtools
npm i https://pkg.pr.new/@tanstack/router-devtools@7219@tanstack/router-devtools-core
npm i https://pkg.pr.new/@tanstack/router-devtools-core@7219@tanstack/router-generator
npm i https://pkg.pr.new/@tanstack/router-generator@7219@tanstack/router-plugin
npm i https://pkg.pr.new/@tanstack/router-plugin@7219@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7219@tanstack/router-utils
npm i https://pkg.pr.new/@tanstack/router-utils@7219@tanstack/router-vite-plugin
npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7219@tanstack/solid-router
npm i https://pkg.pr.new/@tanstack/solid-router@7219@tanstack/solid-router-devtools
npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7219@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7219@tanstack/solid-start
npm i https://pkg.pr.new/@tanstack/solid-start@7219@tanstack/solid-start-client
npm i https://pkg.pr.new/@tanstack/solid-start-client@7219@tanstack/solid-start-server
npm i https://pkg.pr.new/@tanstack/solid-start-server@7219@tanstack/start-client-core
npm i https://pkg.pr.new/@tanstack/start-client-core@7219@tanstack/start-fn-stubs
npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7219@tanstack/start-plugin-core
npm i https://pkg.pr.new/@tanstack/start-plugin-core@7219@tanstack/start-server-core
npm i https://pkg.pr.new/@tanstack/start-server-core@7219@tanstack/start-static-server-functions
npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7219@tanstack/start-storage-context
npm i https://pkg.pr.new/@tanstack/start-storage-context@7219@tanstack/valibot-adapter
npm i https://pkg.pr.new/@tanstack/valibot-adapter@7219@tanstack/virtual-file-routes
npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7219@tanstack/vue-router
npm i https://pkg.pr.new/@tanstack/vue-router@7219@tanstack/vue-router-devtools
npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7219@tanstack/vue-router-ssr-query
npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7219@tanstack/vue-start
npm i https://pkg.pr.new/@tanstack/vue-start@7219@tanstack/vue-start-client
npm i https://pkg.pr.new/@tanstack/vue-start-client@7219@tanstack/vue-start-server
npm i https://pkg.pr.new/@tanstack/vue-start-server@7219@tanstack/zod-adapter
npm i https://pkg.pr.new/@tanstack/zod-adapter@7219commit:
066c658Merging this PR will not alter performance#
✅ 6untouched benchmarks
Comparingjantimon:fix-rsc(066c658) withmain(b57e898)[^unexpected-base]does this still update css then in dev upon hmr? if yes, how?
- packages/react-start-rsc/src/preinitCssHrefs.ts line 18OutdatedResolvedby jantimon(GitHub profile, opens in a new tab)@@ -0,0 +1,18 @@1+import ReactDOM from 'react-dom'2+3+/**4+ * Vite's HMR cache-bust query, e.g. `?t=1776450256042`5+ * Vite only adds this during dev, never in a prod build6+ */7+const HMR_CACHE_BUST = /[?&]t=\d+/8+9+/**10+ * Tells React 19 Float to start fetching each CSS file early and put a11+ * <link rel="stylesheet" data-precedence="high"> in <head> during production builds12+ */13+export function preinitCssHrefs(cssHrefs: Iterable<string> | undefined): void {14+ if (!cssHrefs) return15+ for (const href of cssHrefs) {16+ // Skip Vite's HMR cache-bust query so that no stale <link>s pile up17+ // in <head> during dev from HMR edits. In prod builds, there are no `?t=` hrefs18+ if (HMR_CACHE_BUST.test(href)) continue
this should be guarded by a process.env.NODE_ENV check
done - I switched entirely to your solution as it also fixed another bug
w.r.t. to e2e tests: we already have hmr e2e tests in e2e/react-start/e2e a similar setup should work here as well
Actionable comments posted: 3
🧹 Nitpick comments (1)
e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts (1)
90-110: Add an assertion for the stale stylesheet-link regression.This second-edit test proves CSS still updates, but not that old cache-busted
<link rel="stylesheet">entries stop accumulating. Please assert the relevant stylesheet link count/hrefs in<head>remain bounded after repeated edits so the test fails on the original leak.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts` around lines 90 - 110, After the two editCss steps in the test `${c.label}: a second css change in the same file hot-updates the style`, add assertions that the document head does not accumulate stale cache-busted stylesheet links: query the head for <link rel="stylesheet"> elements (via page.evaluate or page.locator) and assert the count remains bounded (e.g., equals the expected number) and that their hrefs are the current/expected href(s) rather than many old cache-busted variants; place these checks after the final expect(page.getByTestId(c.titleTestId)).toHaveCSS(...) so the test fails if stale `<link rel="stylesheet">` entries leak after calling editCss twice. Ensure you reference the same c/titleTestId context as used in this test and use page.* helpers (page.evaluate or page.locator) to inspect head links.🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Inline comments: In `@e2e/react-start/rsc-hmr/package.json`: - Line 4: The package.json currently declares "sideEffects": false which causes Vite/webpack to tree-shake CSS imports used by GlobalCssCard.tsx and CssModulesCard.tsx; update package.json to preserve CSS side-effects by replacing the boolean with an array of patterns (e.g., ["*.css", "**/*.css"] or the specific CSS module paths) or set "sideEffects": true so CSS imports are not removed during build, ensuring GlobalCssCard.tsx and CssModulesCard.tsx CSS remains included. In `@e2e/react-start/rsc-hmr/tests/hydration.ts`: - Line 1: The import currently mixes a value import and an inline type specifier ("expect, type Page from '@playwright/test'"), which ESLint flags; change it to two imports: keep the value import for "expect" from '@playwright/test' and add a separate type-only import for "Page" (e.g., "import type { Page } from '@playwright/test'") so the "expect" and "Page" symbols are imported separately and satisfy member ordering and type-import rules. In `@e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts`: - Around line 1-5: Reorder the import statements so Node built-ins come before package imports: move "import { readFile, writeFile } from 'node:fs/promises'" and "import path from 'node:path'" above the third‑party imports (e.g., "import { expect } from '@playwright/test'" and "import { test } from '@tanstack/router-e2e-utils'"), keeping the local relative import "import { waitForHydration } from './hydration'" last; preserve the same named symbols (expect, test, readFile, writeFile, path, waitForHydration) and their usage. --- Nitpick comments: In `@e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts`: - Around line 90-110: After the two editCss steps in the test `${c.label}: a second css change in the same file hot-updates the style`, add assertions that the document head does not accumulate stale cache-busted stylesheet links: query the head for <link rel="stylesheet"> elements (via page.evaluate or page.locator) and assert the count remains bounded (e.g., equals the expected number) and that their hrefs are the current/expected href(s) rather than many old cache-busted variants; place these checks after the final expect(page.getByTestId(c.titleTestId)).toHaveCSS(...) so the test fails if stale `<link rel="stylesheet">` entries leak after calling editCss twice. Ensure you reference the same c/titleTestId context as used in this test and use page.* helpers (page.evaluate or page.locator) to inspect head links.🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
799e91c2-3377-4117-b130-eb55afc63c02📥 Commits
Reviewing files that changed from the base of the PR and between 066c6580fcd813c8aca2af9680bc1dc9322237d1 and 94b1643e6d79981042d8d85e8bc0503d2b5e107a.
📒 Files selected for processing (23)
e2e/react-start/rsc-hmr/.gitignoree2e/react-start/rsc-hmr/eslint.config.jse2e/react-start/rsc-hmr/package.jsone2e/react-start/rsc-hmr/playwright.config.tse2e/react-start/rsc-hmr/src/routeTree.gen.tse2e/react-start/rsc-hmr/src/router.tsxe2e/react-start/rsc-hmr/src/routes/__root.tsxe2e/react-start/rsc-hmr/src/routes/index.tsxe2e/react-start/rsc-hmr/src/routes/rsc-hmr-css-modules.tsxe2e/react-start/rsc-hmr/src/routes/rsc-hmr-global-css.tsxe2e/react-start/rsc-hmr/src/utils/CssModulesCard.module.csse2e/react-start/rsc-hmr/src/utils/CssModulesCard.tsxe2e/react-start/rsc-hmr/src/utils/GlobalCssCard.csse2e/react-start/rsc-hmr/src/utils/GlobalCssCard.tsxe2e/react-start/rsc-hmr/src/utils/cssModulesCardServerComponent.tsxe2e/react-start/rsc-hmr/src/utils/globalCssCardServerComponent.tsxe2e/react-start/rsc-hmr/tests/hydration.tse2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.tse2e/react-start/rsc-hmr/tests/setup/global.setup.tse2e/react-start/rsc-hmr/tests/setup/global.teardown.tse2e/react-start/rsc-hmr/tsconfig.jsone2e/react-start/rsc-hmr/vite.config.tspackages/react-start-rsc/src/preinitCssHrefs.ts
✅ Files skipped from review due to trivial changes (7)
- e2e/react-start/rsc-hmr/.gitignore
- e2e/react-start/rsc-hmr/src/utils/GlobalCssCard.css
- e2e/react-start/rsc-hmr/src/utils/CssModulesCard.module.css
- e2e/react-start/rsc-hmr/tsconfig.json
- e2e/react-start/rsc-hmr/src/utils/GlobalCssCard.tsx
- e2e/react-start/rsc-hmr/eslint.config.js
- e2e/react-start/rsc-hmr/src/routeTree.gen.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/react-start-rsc/src/preinitCssHrefs.ts
e2e/react-start/rsc-hmr/package.json line 4OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +1,4 @@1+{2+ "name": "tanstack-react-start-e2e-rsc-hmr",3+ "private": true,4+ "sideEffects": false,⚠️ Potential issue | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash # Description: Inspect sideEffects metadata and CSS imports in the RSC HMR e2e package. sed -n '1,8p' e2e/react-start/rsc-hmr/package.json rg -nP "import\\s+['\"][^'\"]+\\.css['\"]|from\\s+['\"][^'\"]+\\.css['\"]" \ e2e/react-start/rsc-hmr/srcRepository: TanStack/router
Length of output: 1778
🏁 Script executed:
#!/bin/bash # Try to inspect the package.json directly if possible # First, let's see if we can access file contents head -20 e2e/react-start/rsc-hmr/package.json 2>/dev/null || echo "File not accessible" # Check for CSS imports in the src directory rg "\.css['\"]" e2e/react-start/rsc-hmr/src 2>/dev/null || echo "Search failed"Repository: TanStack/router
Length of output: 829
🌐 Web query:
sideEffects false CSS imports bundler tree-shaking Vite best practices💡 Result:
In Vite, tree-shaking for CSS imports works during production builds because Vite (via Rollup) treats CSS imports as side-effectful by default, meaning unused CSS modules imported through unused code paths are excluded from the final bundle. This eliminates dead CSS code automatically without special configuration in most cases. Key points and best practices: 1. Default Behavior: CSS files imported via import './style.css' are side-effectful. If the importing module is tree-shaken (unused), the CSS is not emitted. This is intentional to preserve global styles when needed. Sources confirm Vite processes CSS this way in builds. 2. package.json sideEffects: For libraries, set "sideEffects": false in package.json to signal no side effects, enabling better tree-shaking of barrel exports (including CSS imports). Vite/Rollup respects this via
@rollup/plugin-node-resolve. However, explicitly list side-effect files like "sideEffects": ["/*.css"] if your library has global CSS that must always load. Avoid sideEffects: false if it causes missing styles. 3. vite.config.js Tweaks (Advanced): Tree-shaking is enabled by default in builds. To tune: export default defineConfig({ build: { rollupOptions: { treeshake: { moduleSideEffects: false // Assume imports in modules are side-effect-free if package.json allows; risky for CSS } } } }) Use cautiously—can remove necessary side effects (e.g., polyfills, CSS). Vite core team recommends avoiding manual changes unless necessary, as it can break apps. 4. Dev vs Build: In dev, all imported CSS loads (no tree-shaking for perf). Production optimizes. 5. Scoped CSS (Vue): Scoped styles in Vue SFCs can be tree-shaken if the component is unused. 6. Pitfalls: - Barrel files (index.js re-exporting everything) include all CSS unless sideEffects: false. - Conditional CSS imports (e.g., if (...) import('./css')) tree-shake properly, but referenced assets (fonts) may emit if not careful. - For libraries, use subpath exports instead of barrels for optimal shaking. No official Vite doc page on "CSS tree-shaking" exists, but behavior aligns with Rollup. Test with vite build --debug and bundle analyzers like rollup-plugin-visualizer. Prioritize ESM, avoid side-effect mutations for best results.Citations:
- 1: https://github.com/vitejs/vite/issues/4389
- 2: https://github.com/rollup/rollup/issues/5987
- 3: https://github.com/vitejs/vite/issues/4389?timeline_page=1
- 4: https://webpack.js.org/guides/tree-shaking/
- 5: https://github.com/vitejs/vite/issues/17911
- 6: https://github.com/vitejs/vite/issues/9073
- 7: https://vite.dev/guide/features
- 8: https://github.com/vitejs/vite/issues/15660
- 9: https://github.com/vitejs/vite/issues/14558
- 10: https://vitejs.dev/config/build-options/
- 11: https://umaranis.com/2025/02/01/tree-shaking-css-in-a-vite-project/
Prevent CSS imports from being tree-shaken by explicitly marking CSS files as side-effectful.
The package imports CSS directly in
GlobalCssCard.tsxand via CSS modules inCssModulesCard.tsx, but declares"sideEffects": falseglobally. This signals to Vite that the package has no side effects, which can cause tree-shaking to remove CSS imports during builds. Update the metadata to preserve CSS side effects:🛡️ Proposed fix
- "sideEffects": false, + "sideEffects": ["**/*.css"],📝 Committable suggestion
‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Suggested change4- "sideEffects": false,4+ "sideEffects": ["**/*.css"],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/react-start/rsc-hmr/package.json` at line 4, The package.json currently declares "sideEffects": false which causes Vite/webpack to tree-shake CSS imports used by GlobalCssCard.tsx and CssModulesCard.tsx; update package.json to preserve CSS side-effects by replacing the boolean with an array of patterns (e.g., ["*.css", "**/*.css"] or the specific CSS module paths) or set "sideEffects": true so CSS imports are not removed during build, ensuring GlobalCssCard.tsx and CssModulesCard.tsx CSS remains included.✅ Addressed in commits 3ecc859 to f4f9275
e2e/react-start/rsc-hmr/tests/hydration.ts line 1OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +1 @@1+import { expect, type Page } from '@playwright/test'⚠️ Potential issue | 🟡 Minor
Fix the lint-blocking Playwright import.
ESLint flags the inline
type Pagespecifier and member ordering here. Split the type import from the value import.Proposed fix
-import { expect, type Page } from '@playwright/test' +import type { Page } from '@playwright/test' +import { expect } from '@playwright/test'📝 Committable suggestion
‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Suggested change1-import { expect, type Page } from '@playwright/test'1+import type { Page } from '@playwright/test'2+import { expect } from '@playwright/test'🧰 Tools
🪛 ESLint
[error] 1-1: Member 'Page' of the import declaration should be sorted alphabetically.
(sort-imports)
[error] 1-1: Prefer using a top-level type-only import instead of inline type specifiers.
(import/consistent-type-specifier-style)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/react-start/rsc-hmr/tests/hydration.ts` at line 1, The import currently mixes a value import and an inline type specifier ("expect, type Page from '@playwright/test'"), which ESLint flags; change it to two imports: keep the value import for "expect" from '@playwright/test' and add a separate type-only import for "Page" (e.g., "import type { Page } from '@playwright/test'") so the "expect" and "Page" symbols are imported separately and satisfy member ordering and type-import rules.✅ Addressed in commits cd91cee to 3fa7ef9
e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts lines 1 to 5OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +1,5 @@1+import { expect } from '@playwright/test'2+import { test } from '@tanstack/router-e2e-utils'3+import { readFile, writeFile } from 'node:fs/promises'4+import path from 'node:path'5+import { waitForHydration } from './hydration'⚠️ Potential issue | 🟡 Minor
Fix the lint-reported import order.
The static analysis error indicates Node built-in imports should be ordered before the package imports.
🧹 Proposed fix
-import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' import { readFile, writeFile } from 'node:fs/promises' import path from 'node:path' +import { expect } from '@playwright/test' +import { test } from '@tanstack/router-e2e-utils' import { waitForHydration } from './hydration'📝 Committable suggestion
‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Suggested change1-import { expect } from '@playwright/test'2-import { test } from '@tanstack/router-e2e-utils'3-import { readFile, writeFile } from 'node:fs/promises'4-import path from 'node:path'5-import { waitForHydration } from './hydration'1+import { readFile, writeFile } from 'node:fs/promises'2+import path from 'node:path'3+import { expect } from '@playwright/test'4+import { test } from '@tanstack/router-e2e-utils'5+import { waitForHydration } from './hydration'🧰 Tools
🪛 ESLint
[error] 3-3:
node:fs/promisesimport should occur before import of@playwright/test(import/order)
[error] 4-4:
node:pathimport should occur before import of@playwright/test(import/order)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts` around lines 1 - 5, Reorder the import statements so Node built-ins come before package imports: move "import { readFile, writeFile } from 'node:fs/promises'" and "import path from 'node:path'" above the third‑party imports (e.g., "import { expect } from '@playwright/test'" and "import { test } from '@tanstack/router-e2e-utils'"), keeping the local relative import "import { waitForHydration } from './hydration'" last; preserve the same named symbols (expect, test, readFile, writeFile, path, waitForHydration) and their usage.✅ Addressed in commits 3ecc859 to f4f9275
does this still update css then in dev upon hmr? if yes, how?
@vitejs/plugin-rsc<Resources>emits a<link rel="stylesheet" data-rsc-css-href="...">directly in the Flight stream for every CSS dependencypreinitwas adding a second<link>for preloadingThe HMR e2e tests in this branch are blocked by https://github.com/vitejs/vite-plugin-react/pull/1188
@hi-ogawa could you please take a look at both PRs and let me know what you think about the fix and the e2e tests?
@jantimon can you please test with the vite-rsc-plugin preview build in https://github.com/vitejs/vite-plugin-react/pull/1188#issuecomment-4311493996
@hi-ogawa did a great job this weekend and finished, merged and relased my vite-plugin-react pr: vite-plugin-react changelog 🎉
vite-plugin-react v0.5.25
rsc: fix server css hmr with cssLinkPrecedence: false (#1188) (f4647c4)
I will retest tanstack start again with this version and try to simplify the e2e tests today
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Inline comments: In `@e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts`: - Around line 71-132: Add an assertion in each affected test after the CSS edit and final expect to verify the set/count of HMR stylesheet links to catch the stale-link regression: query the DOM for link[rel="stylesheet"][data-rsc-css-href] (e.g., via page.locator or page.evaluate) and assert that there is exactly one entry (or that the href set contains only the latest href) so that tests like the ones using editCss, waitForHydration, and c.titleTestId fail if old <link> nodes accumulate; place this check right after the final await expect(...) in each test.🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
f49d6cfa-c721-44d3-89e3-24fe216ab5d7📥 Commits
Reviewing files that changed from the base of the PR and between 3fa7ef96ff508a6eda0c48771be4f8bc303c49bf and 1d97f8323f4f686b357530ea0fe7dc37dc1bee83.
📒 Files selected for processing (27)
.changeset/fix-rsc-stale-css-hmr.mde2e/react-start/rsc-hmr/.gitignoree2e/react-start/rsc-hmr/eslint.config.jse2e/react-start/rsc-hmr/package.jsone2e/react-start/rsc-hmr/playwright.config.tse2e/react-start/rsc-hmr/src/routeTree.gen.tse2e/react-start/rsc-hmr/src/router.tsxe2e/react-start/rsc-hmr/src/routes/__root.tsxe2e/react-start/rsc-hmr/src/routes/index.tsxe2e/react-start/rsc-hmr/src/routes/rsc-hmr-css-modules.tsxe2e/react-start/rsc-hmr/src/routes/rsc-hmr-global-css.tsxe2e/react-start/rsc-hmr/src/utils/CssModulesCard.module.csse2e/react-start/rsc-hmr/src/utils/CssModulesCard.tsxe2e/react-start/rsc-hmr/src/utils/GlobalCssCard.csse2e/react-start/rsc-hmr/src/utils/GlobalCssCard.tsxe2e/react-start/rsc-hmr/src/utils/cssModulesCardServerComponent.tsxe2e/react-start/rsc-hmr/src/utils/globalCssCardServerComponent.tsxe2e/react-start/rsc-hmr/tests/hydration.tse2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.tse2e/react-start/rsc-hmr/tests/setup/global.setup.tse2e/react-start/rsc-hmr/tests/setup/global.teardown.tse2e/react-start/rsc-hmr/tsconfig.jsone2e/react-start/rsc-hmr/vite.config.tspackage.jsonpackages/react-start-rsc/src/CompositeComponent.tsxpackages/react-start-rsc/src/RscNodeRenderer.tsxpackages/react-start-rsc/src/preinitCssHrefs.ts
✅ Files skipped from review due to trivial changes (15)
- e2e/react-start/rsc-hmr/.gitignore
- package.json
- .changeset/fix-rsc-stale-css-hmr.md
- e2e/react-start/rsc-hmr/src/utils/cssModulesCardServerComponent.tsx
- e2e/react-start/rsc-hmr/src/utils/GlobalCssCard.css
- e2e/react-start/rsc-hmr/src/utils/GlobalCssCard.tsx
- e2e/react-start/rsc-hmr/src/utils/CssModulesCard.module.css
- e2e/react-start/rsc-hmr/src/utils/CssModulesCard.tsx
- e2e/react-start/rsc-hmr/tests/hydration.ts
- e2e/react-start/rsc-hmr/src/router.tsx
- e2e/react-start/rsc-hmr/src/routes/rsc-hmr-css-modules.tsx
- e2e/react-start/rsc-hmr/tsconfig.json
- e2e/react-start/rsc-hmr/eslint.config.js
- e2e/react-start/rsc-hmr/package.json
- e2e/react-start/rsc-hmr/src/routeTree.gen.ts
🚧 Files skipped from review as they are similar to previous changes (10)
- packages/react-start-rsc/src/CompositeComponent.tsx
- e2e/react-start/rsc-hmr/tests/setup/global.teardown.ts
- e2e/react-start/rsc-hmr/src/utils/globalCssCardServerComponent.tsx
- e2e/react-start/rsc-hmr/src/routes/index.tsx
- e2e/react-start/rsc-hmr/vite.config.ts
- e2e/react-start/rsc-hmr/tests/setup/global.setup.ts
- e2e/react-start/rsc-hmr/playwright.config.ts
- packages/react-start-rsc/src/RscNodeRenderer.tsx
- e2e/react-start/rsc-hmr/src/routes/rsc-hmr-global-css.tsx
- e2e/react-start/rsc-hmr/src/routes/__root.tsx
e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts lines 71 to 132Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +112,21 @@112+113+ test(`${c.label}: removing a css property hot-updates the style`, async ({114+ page,115+ }) => {116+ await page.goto(c.route)117+ await waitForHydration(page)118+119+ await expect(page.getByTestId(c.titleTestId)).toHaveCSS(120+ 'text-transform',121+ 'uppercase',122+ )123+124+ await editCss(c, (source) =>125+ source.replace('text-transform: uppercase;', ''),126+ )127+128+ await expect(page.getByTestId(c.titleTestId)).toHaveCSS(129+ 'text-transform',130+ 'none',131+ )132+ })⚠️ Potential issue | 🟡 Minor
Cover the actual stale-link regression.
These checks prove CSS updates propagate, but they would still pass if the old HMR
<link>nodes kept piling up in<head>. Please add an assertion on thelink[rel="stylesheet"][data-rsc-css-href]set or link count so the leak this PR fixes is exercised directly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts` around lines 71 - 132, Add an assertion in each affected test after the CSS edit and final expect to verify the set/count of HMR stylesheet links to catch the stale-link regression: query the DOM for link[rel="stylesheet"][data-rsc-css-href] (e.g., via page.locator or page.evaluate) and assert that there is exactly one entry (or that the href set contains only the latest href) so that tests like the ones using editCss, waitForHydration, and c.titleTestId fail if old <link> nodes accumulate; place this check right after the final await expect(...) in each test.✅ Confirmed as addressed by @jantimon
this is tested explicitly by removing a css prop
@jantimonThat's a fair point — you're right. If a stale<link>element with the old cached CSS (containingtext-transform: uppercase) lingered in<head>, and the new stylesheet (without the property) was appended as a separate link, the browser's cascade would keepuppercaseactive since the new file doesn't override it. ThetoHaveCSS('text-transform', 'none')assertion would then fail, meaning the removal test does implicitly catch the stale-link accumulation bug. I'll withdraw that concern.
🧠 Learnings used
Learnt from: nlynzaad Repo: TanStack/router PR: 5402 File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21 Timestamp: 2025-10-08T08:11:47.088Z Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
Learnt from: ChiragAgg5k Repo: TanStack/router PR: 7225 File: examples/react/start-appwrite-basic/src/styles/app.css:27-29 Timestamp: 2026-04-19T10:49:41.803Z Learning: In `examples/react/start-appwrite-basic/src/styles/app.css` (and its counterpart `examples/react/start-supabase-basic/src/styles/app.css`), the `.using-mouse * { outline: none !important; }` rule is intentionally shared verbatim between the two example projects for parity. Any accessibility improvements (e.g., scoping to `:focus:not(:focus-visible)`) should be applied to both files in the same PR.
Learnt from: nlynzaad Repo: TanStack/router PR: 6215 File: e2e/react-start/custom-basepath/package.json:13-17 Timestamp: 2025-12-25T13:04:55.492Z Learning: In the TanStack Router repository, e2e test scripts are specifically designed to run in CI (which uses a Unix environment), so Unix-specific commands (like `rm -rf`, `&` for backgrounding, and direct environment variable assignments without `cross-env`) are acceptable in e2e test npm scripts.
Learnt from: nlynzaad Repo: TanStack/router PR: 6389 File: e2e/solid-start/basic/src/routes/specialChars/malformed/route.tsx:11-24 Timestamp: 2026-01-18T17:36:24.388Z Learning: In TanStack Router e2e malformed test routes (e.g., `e2e/solid-start/basic/src/routes/specialChars/malformed/route.tsx`), intentional use of `href` prop instead of `to` prop on Link components may be used for testing purposes to validate specific encoding/decoding behaviors or edge cases, even though the standard `tanstack/solid-router` Link API uses the `to` prop.
Learnt from: ChiragAgg5k Repo: TanStack/router PR: 7225 File: examples/react/start-appwrite-basic/src/utils/seo.ts:12-30 Timestamp: 2026-04-19T10:49:45.478Z Learning: In the TanStack Router repository, `examples/react/start-appwrite-basic/src/utils/seo.ts` is intentionally copied verbatim from `examples/react/start-supabase-basic/src/utils/seo.ts` to maintain parity between the two examples. Any fixes (e.g., using `property: 'og:*'` for Open Graph tags, conditionally emitting optional meta fields) should be applied to both files together in the same PR rather than fixing one in isolation.Okay so I verified that
@vitejs/plugin-rsc0.5.25+vite8.0.10+ this PR fixes the HMR and all new e2e tests passI also verified this PR is still needed
Removing
if (process.env.NODE_ENV !== 'production') returnin https://github.com/jantimon/tanstack-router/blob/1d97f8323f4f686b357530ea0fe7dc37dc1bee83/packages/react-start-rsc/src/preinitCssHrefs.ts#L11 will break the e2e test which verifies that no stale styles survive a delete:tests/rsc-hmr-css.spec.ts:113:5 › rsc css hmr › global .css: removing a css property hot-updates the style Expected: "none" Received: "uppercase"w.r.t. to e2e tests: we already have hmr e2e tests in e2e/react-start/e2e a similar setup should work here as well
I looked into consolidating these tests but there are some blockers because of rspack rsc compatibility:
- The following import fails because there is no
@rspack/core/rsc/ssr: https://github.com/TanStack/router/blob/b0024d6310f123736ea18a7f8692b45265cdee74/packages/react-start-rsc/src/rsbuild/ssr-decode.ts#L8 - If we exclude the rsc routes for rspack
routeTree.gen.tsflip-flops between toolchains - Types don't match for rspack and rsc so I ran into:
src/routes/rsc-hmr-css-modules.tsx(4,38): error TS2345: Argument of type '"/rsc-hmr-css-modules"' is not assignable to parameter of type 'keyof FileRoutesByPath | undefined'src/routes/rsc-hmr-css-modules.tsx(13,11): error TS2339: Property 'Server' does not exist on type '{ crumb: string; } | undefined'
If you like I can disable the typecheck for rspack inside
e2e/react-start/rsc-hmr, exclude the HMR routes and add a git ignore entry forrouteTree.gen.tsWhat do you think?
- The following import fails because there is no
these tests should not run for rspack (yet), please only let them run for vite
@schiller-manuel
agree but currently all RSC tests run for rspack and also the typecheck works
if I now add the HMR tests to the existing RSC tests and exclude rspack for theses tests I get the issues mentioned above
If you like I can disable the typecheck for rspack inside e2e/react-start/rsc-hmr, exclude the HMR routes and add a git ignore entry for routeTree.gen.ts
is this okay?
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
Diff Package Supply Chain
SecurityVulnerability Quality Maintenance License @vitejs/plugin-rsc@0.5.26 rsc in rsbuild is done now, so this should changed now to only apply for vite
@schiller-manuel I got rspack working with
source: {include: [/[\\/]node_modules[\\/]@tanstack[\\/]/]}(btw is that the correct way?) and you are right!rspack works with HMR out of the box without any fix needed
do you think we could fix the css invalidation totally on the vite site without any changes to tanstack start? should I add the tests anyway?
Superseded by #8277, which builds on this contribution and consolidates the related HMR and missing-chunk recovery fixes. Contributor credit is preserved in the replacement.
Sign in to join this conversation.
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
📝 Walkthrough
Walkthrough#
Extracted CSS preinit logic into a new helper and added a complete end-to-end RSC CSS HMR test workspace (router, routes, test components, server fns, Playwright config, Vite/TS configs, and tests).
Changes#
packages/react-start-rsc/src/preinitCssHrefs.ts,packages/react-start-rsc/src/CompositeComponent.tsx,packages/react-start-rsc/src/RscNodeRenderer.tsxpreinitCssHrefs(cssHrefs)and replaced inline CSS preinit loops in CompositeComponent and RscNodeRenderer to delegate to this helper; preinit now no-ops outside production.e2e/react-start/rsc-hmr/package.json,e2e/react-start/rsc-hmr/vite.config.ts,e2e/react-start/rsc-hmr/tsconfig.json,e2e/react-start/rsc-hmr/eslint.config.js,e2e/react-start/rsc-hmr/.gitignoree2e/react-start/rsc-hmr/playwright.config.ts,e2e/react-start/rsc-hmr/tests/setup/global.setup.ts,e2e/react-start/rsc-hmr/tests/setup/global.teardown.tse2e/react-start/rsc-hmr/src/routeTree.gen.ts,e2e/react-start/rsc-hmr/src/router.tsx,e2e/react-start/rsc-hmr/src/routes/__root.tsx,e2e/react-start/rsc-hmr/src/routes/index.tsx,e2e/react-start/rsc-hmr/src/routes/rsc-hmr-css-modules.tsx,e2e/react-start/rsc-hmr/src/routes/rsc-hmr-global-css.tsxe2e/react-start/rsc-hmr/src/utils/CssModulesCard.tsx,e2e/react-start/rsc-hmr/src/utils/CssModulesCard.module.css,e2e/react-start/rsc-hmr/src/utils/GlobalCssCard.tsx,e2e/react-start/rsc-hmr/src/utils/GlobalCssCard.css,e2e/react-start/rsc-hmr/src/utils/cssModulesCardServerComponent.tsx,e2e/react-start/rsc-hmr/src/utils/globalCssCardServerComponent.tsxe2e/react-start/rsc-hmr/tests/rsc-hmr-css.spec.ts,e2e/react-start/rsc-hmr/tests/hydration.ts.changeset/fix-rsc-stale-css-hmr.md,package.jsonviteto ^8.0.10.Sequence Diagram(s)#
Estimated code review effort#
🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem#
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 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.
❤️ Share