File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed
packages/start-server-core/src Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export function createStartHandler<TRouter extends AnyRouter>({
106106 const router = createRouter ( )
107107
108108 // Attach the server-side SSR utils to the client-side router
109- attachRouterServerSsrUtils ( router , getStartManifest ( ) )
109+ attachRouterServerSsrUtils ( router , await getStartManifest ( ) )
110110
111111 // Update the client-side router with the history and context
112112 router . update ( {
Original file line number Diff line number Diff line change 1- import { tsrStartManifest } from 'tanstack-start-router-manifest:v'
21import { rootRouteId } from '@tanstack/router-core'
32
43declare global {
@@ -12,7 +11,8 @@ declare global {
1211 * special assets that are needed for the client. It does not include relationships
1312 * between routes or any other data that is not needed for the client.
1413 */
15- export function getStartManifest ( ) {
14+ export async function getStartManifest ( ) {
15+ const { tsrStartManifest } = await import ( 'tanstack-start-router-manifest:v' )
1616 const startManifest = tsrStartManifest ( )
1717
1818 const rootRoute = ( startManifest . routes [ rootRouteId ] =
Original file line number Diff line number Diff line change 11import { isNotFound } from '@tanstack/router-core'
22import invariant from 'tiny-invariant'
33import { startSerializer } from '@tanstack/start-client-core'
4- // @ts -expect-error
5- import _serverFnManifest from 'tanstack-start-server-fn-manifest:v'
64import { getEvent , getResponseStatus } from './h3'
75
8- const serverFnManifest = _serverFnManifest as Record <
9- string ,
10- {
11- functionName : string
12- extractedFilename : string
13- importer : ( ) => Promise < any >
14- }
15- >
16-
176function sanitizeBase ( base : string | undefined ) {
187 if ( ! base ) {
198 throw new Error (
@@ -53,6 +42,19 @@ export const handleServerAction = async ({ request }: { request: Request }) => {
5342 throw new Error ( 'Invalid server action param for serverFnId: ' + serverFnId )
5443 }
5544
45+ const { default : _serverFnManifest } = await import (
46+ // @ts -expect-error
47+ 'tanstack-start-server-fn-manifest:v'
48+ )
49+
50+ const serverFnManifest = _serverFnManifest as Record <
51+ string ,
52+ {
53+ functionName : string
54+ extractedFilename : string
55+ importer : ( ) => Promise < any >
56+ }
57+ >
5658 const serverFnInfo = serverFnManifest [ serverFnId ]
5759
5860 if ( ! serverFnInfo ) {
You can’t perform that action at this time.
0 commit comments