File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ export type {
311
311
StrictOrFrom ,
312
312
LooseReturnType ,
313
313
LooseAsyncReturnType ,
314
+ Awaitable ,
314
315
} from './utils'
315
316
316
317
export type {
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import type { RequestHandler } from './h3'
26
26
import type {
27
27
AnyRoute ,
28
28
AnyRouter ,
29
+ Awaitable ,
29
30
Manifest ,
30
31
ProcessRouteTreeResult ,
31
32
} from '@tanstack/router-core'
@@ -53,7 +54,7 @@ function getStartResponseHeaders(opts: { router: AnyRouter }) {
53
54
export function createStartHandler < TRouter extends AnyRouter > ( {
54
55
createRouter,
55
56
} : {
56
- createRouter : ( ) => TRouter
57
+ createRouter : ( ) => Awaitable < TRouter >
57
58
} ) : CustomizeStartHandler < TRouter > {
58
59
let routeTreeModule : {
59
60
serverRouteTree : AnyServerRouteWithTypes | undefined
@@ -112,7 +113,7 @@ export function createStartHandler<TRouter extends AnyRouter>({
112
113
const APP_BASE = process . env . TSS_APP_BASE || '/'
113
114
114
115
// TODO how does this work with base path? does the router need to be configured the same as APP_BASE?
115
- const router = createRouter ( )
116
+ const router = await createRouter ( )
116
117
// Create a history for the client-side router
117
118
const history = createMemoryHistory ( {
118
119
initialEntries : [ href ] ,
You can’t perform that action at this time.
0 commit comments