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

start: a server fn the file's code does not name lives in the lazy module with its chain; a split chunk calls it through a stub (R158 step 4, rules 1 and 2)

The file roots no wrapper of a server fn declared as const fn = <chain>
whose root is createServerFn(<no options | literal method>); the lazy
module re-exports the wrapper and the server fn (tsrFn$...), so the file
holds them only when its own code names the server fn, else the lazy
module does. In split chunks the declarator's value renders as
createSsrFnStub(id, method, () => import(lazy).then((m) => m.tsrFn$...))
(start-server-core, exported from each framework's ssr-rpc): a chunk
copying the declaration calls the one instance at the call. Dev test: a
server fn the lazy module holds, edits of its validator module and of its
handler reach HTTP calls (Vite, Rsbuild).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-11-15 17:23:52 +01:00
commit 83531d3a64
No known key found for this signature in database
7 changed files with 210 additions and 22 deletions