0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

fix(start-plugin-core): Vite RSC always derives the server-fn provider module

PROPOSAL (contradicts DECISIONS D6 'derived provider modules only for
Rsbuild RSC and Vite RSC use-client modules'; architect's call).

With the route module itself as the rsc env's provider, the provider
evaluates the module's client-only module-level code under react-server:
a route defining a server fn next to React.createContext(...) failed
with 'createContext is not a function' (react-start/rsc e2e rsc-context,
Vite; main passes, Rsbuild passes since it always derives). The rsc env
now gets the ?tss-serverfn-split provider output (what the server fns
reach), as on Rsbuild.

Test: react-start-rsc rsc-start-build 'a server fn runs in the provider
next to its route module's client-only code' (failed before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-25 12:18:54 +01:00
commit 4d67d19fb2
No known key found for this signature in database
2 changed files with 31 additions and 0 deletions