Skip to content

Enable RSC Framework Mode - #259

Open
brookslybrand wants to merge 2 commits into
mainfrom
rsc-framework-minimal
Open

brookslybrand wants to merge 2 commits into
mainfrom
rsc-framework-minimal

Conversation

@brookslybrand

@brookslybrand brookslybrand commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

This turns on React Router 8.4's unstable RSC Framework Mode with as few changes as possible. No page components were changed. They all still render the way they did before. The server component work is in #258.

What changed:

  • Added @vitejs/plugin-rsc and new entry.rsc.tsx / entry.ssr.tsx files, replacing entry.server.tsx. server.ts now hands requests to the RSC build's fetch handler.
  • Removed <Scripts /> from the root layout and dropped splitRouteModules from the config, since RSC mode doesn't support either.
  • Moved getColorScheme and the ColorScheme type into color-scheme/utils.ts so the server action doesn't import from a "use client" file.
  • The SSR entry passes non-Flight responses straight through, so .md URLs still return raw Markdown.
  • Swapped <Await> for use() on the homepage stats. <Await> doesn't handle RSC promises yet, so the stats were never server-rendered and the browser logged hydration errors.

Everything else should work the same as before: middleware, caching, waiting for full content for bots, the stream timeout, error logging, SRI, and .server import protection. I smoke tested a production build: homepage, docs, the brand page, .md URLs, HEAD requests, and the theme toggle.

RSC Framework Mode is still unstable. #237 was useful background, but where it differed from the 8.4 RSC docs I followed the docs.

@brookslybrand
brookslybrand added this pull request to stack #260 October 8, 2026 14:07
@brookslybrand brookslybrand changed the title Enable unstable RSC Framework Mode (minimal migration) Enable RSC Framework Mode Oct 8, 2026
@brookslybrand
brookslybrand force-pushed the rsc-framework-minimal branch from 79e561a to bb21bba Compare October 8, 2026 17:02
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.

1 participant