@@ -13,18 +13,25 @@ import { createFileRoute } from '@tanstack/react-router'
1313// Import Routes
1414
1515import { Route as rootRoute } from './routes/__root'
16+ import { Route as IndexImport } from './routes/index'
1617
1718// Create Virtual Routes
1819
19- const IndexLazyImport = createFileRoute ( '/' ) ( )
20+ const QueryLazyImport = createFileRoute ( '/query ' ) ( )
2021
2122// Create/Update Routes
2223
23- const IndexLazyRoute = IndexLazyImport . update ( {
24+ const QueryLazyRoute = QueryLazyImport . update ( {
25+ id : '/query' ,
26+ path : '/query' ,
27+ getParentRoute : ( ) => rootRoute ,
28+ } as any ) . lazy ( ( ) => import ( './routes/query.lazy' ) . then ( ( d ) => d . Route ) )
29+
30+ const IndexRoute = IndexImport . update ( {
2431 id : '/' ,
2532 path : '/' ,
2633 getParentRoute : ( ) => rootRoute ,
27- } as any ) . lazy ( ( ) => import ( './routes/index.lazy' ) . then ( ( d ) => d . Route ) )
34+ } as any )
2835
2936// Populate the FileRoutesByPath interface
3037
@@ -34,7 +41,14 @@ declare module '@tanstack/react-router' {
3441 id : '/'
3542 path : '/'
3643 fullPath : '/'
37- preLoaderRoute : typeof IndexLazyImport
44+ preLoaderRoute : typeof IndexImport
45+ parentRoute : typeof rootRoute
46+ }
47+ '/query' : {
48+ id : '/query'
49+ path : '/query'
50+ fullPath : '/query'
51+ preLoaderRoute : typeof QueryLazyImport
3852 parentRoute : typeof rootRoute
3953 }
4054 }
@@ -43,33 +57,38 @@ declare module '@tanstack/react-router' {
4357// Create and export the route tree
4458
4559export interface FileRoutesByFullPath {
46- '/' : typeof IndexLazyRoute
60+ '/' : typeof IndexRoute
61+ '/query' : typeof QueryLazyRoute
4762}
4863
4964export interface FileRoutesByTo {
50- '/' : typeof IndexLazyRoute
65+ '/' : typeof IndexRoute
66+ '/query' : typeof QueryLazyRoute
5167}
5268
5369export interface FileRoutesById {
5470 __root__ : typeof rootRoute
55- '/' : typeof IndexLazyRoute
71+ '/' : typeof IndexRoute
72+ '/query' : typeof QueryLazyRoute
5673}
5774
5875export interface FileRouteTypes {
5976 fileRoutesByFullPath : FileRoutesByFullPath
60- fullPaths : '/'
77+ fullPaths : '/' | '/query'
6178 fileRoutesByTo : FileRoutesByTo
62- to : '/'
63- id : '__root__' | '/'
79+ to : '/' | '/query'
80+ id : '__root__' | '/' | '/query'
6481 fileRoutesById : FileRoutesById
6582}
6683
6784export interface RootRouteChildren {
68- IndexLazyRoute : typeof IndexLazyRoute
85+ IndexRoute : typeof IndexRoute
86+ QueryLazyRoute : typeof QueryLazyRoute
6987}
7088
7189const rootRouteChildren : RootRouteChildren = {
72- IndexLazyRoute : IndexLazyRoute ,
90+ IndexRoute : IndexRoute ,
91+ QueryLazyRoute : QueryLazyRoute ,
7392}
7493
7594export const routeTree = rootRoute
@@ -82,11 +101,15 @@ export const routeTree = rootRoute
82101 "__root__": {
83102 "filePath": "__root.tsx",
84103 "children": [
85- "/"
104+ "/",
105+ "/query"
86106 ]
87107 },
88108 "/": {
89- "filePath": "index.lazy.tsx"
109+ "filePath": "index.tsx"
110+ },
111+ "/query": {
112+ "filePath": "query.lazy.tsx"
90113 }
91114 }
92115}
0 commit comments