1010
1111import { createFileRoute } from '@tanstack/react-router'
1212
13- // Import Routes
13+ import { Route as rootRouteImport } from './routes/__root'
14+ import { Route as AuthenticateRouteImport } from './routes/authenticate'
15+ import { Route as IndexRouteImport } from './routes/index'
1416
15- import { Route as rootRoute } from './routes/__root'
16- import { Route as AuthenticateImport } from './routes/authenticate'
17- import { Route as IndexImport } from './routes/index'
17+ const LoginLazyRouteImport = createFileRoute ( '/login' ) ( )
1818
19- // Create Virtual Routes
20-
21- const LoginLazyImport = createFileRoute ( '/login' ) ( )
22-
23- // Create/Update Routes
24-
25- const LoginLazyRoute = LoginLazyImport . update ( {
19+ const LoginLazyRoute = LoginLazyRouteImport . update ( {
2620 id : '/login' ,
2721 path : '/login' ,
28- getParentRoute : ( ) => rootRoute ,
22+ getParentRoute : ( ) => rootRouteImport ,
2923} as any ) . lazy ( ( ) => import ( './routes/login.lazy' ) . then ( ( d ) => d . Route ) )
30-
31- const AuthenticateRoute = AuthenticateImport . update ( {
24+ const AuthenticateRoute = AuthenticateRouteImport . update ( {
3225 id : '/authenticate' ,
3326 path : '/authenticate' ,
34- getParentRoute : ( ) => rootRoute ,
27+ getParentRoute : ( ) => rootRouteImport ,
3528} as any )
36-
37- const IndexRoute = IndexImport . update ( {
29+ const IndexRoute = IndexRouteImport . update ( {
3830 id : '/' ,
3931 path : '/' ,
40- getParentRoute : ( ) => rootRoute ,
32+ getParentRoute : ( ) => rootRouteImport ,
4133} as any )
4234
43- // Populate the FileRoutesByPath interface
44-
45- declare module '@tanstack/react-router' {
46- interface FileRoutesByPath {
47- '/' : {
48- id : '/'
49- path : '/'
50- fullPath : '/'
51- preLoaderRoute : typeof IndexImport
52- parentRoute : typeof rootRoute
53- }
54- '/authenticate' : {
55- id : '/authenticate'
56- path : '/authenticate'
57- fullPath : '/authenticate'
58- preLoaderRoute : typeof AuthenticateImport
59- parentRoute : typeof rootRoute
60- }
61- '/login' : {
62- id : '/login'
63- path : '/login'
64- fullPath : '/login'
65- preLoaderRoute : typeof LoginLazyImport
66- parentRoute : typeof rootRoute
67- }
68- }
69- }
70-
71- // Create and export the route tree
72-
7335export interface FileRoutesByFullPath {
7436 '/' : typeof IndexRoute
7537 '/authenticate' : typeof AuthenticateRoute
7638 '/login' : typeof LoginLazyRoute
7739}
78-
7940export interface FileRoutesByTo {
8041 '/' : typeof IndexRoute
8142 '/authenticate' : typeof AuthenticateRoute
8243 '/login' : typeof LoginLazyRoute
8344}
84-
8545export interface FileRoutesById {
86- __root__ : typeof rootRoute
46+ __root__ : typeof rootRouteImport
8747 '/' : typeof IndexRoute
8848 '/authenticate' : typeof AuthenticateRoute
8949 '/login' : typeof LoginLazyRoute
9050}
91-
9251export interface FileRouteTypes {
9352 fileRoutesByFullPath : FileRoutesByFullPath
9453 fullPaths : '/' | '/authenticate' | '/login'
@@ -97,43 +56,43 @@ export interface FileRouteTypes {
9756 id : '__root__' | '/' | '/authenticate' | '/login'
9857 fileRoutesById : FileRoutesById
9958}
100-
10159export interface RootRouteChildren {
10260 IndexRoute : typeof IndexRoute
10361 AuthenticateRoute : typeof AuthenticateRoute
10462 LoginLazyRoute : typeof LoginLazyRoute
10563}
10664
65+ declare module '@tanstack/react-router' {
66+ interface FileRoutesByPath {
67+ '/login' : {
68+ id : '/login'
69+ path : '/login'
70+ fullPath : '/login'
71+ preLoaderRoute : typeof LoginLazyRouteImport
72+ parentRoute : typeof rootRouteImport
73+ }
74+ '/authenticate' : {
75+ id : '/authenticate'
76+ path : '/authenticate'
77+ fullPath : '/authenticate'
78+ preLoaderRoute : typeof AuthenticateRouteImport
79+ parentRoute : typeof rootRouteImport
80+ }
81+ '/' : {
82+ id : '/'
83+ path : '/'
84+ fullPath : '/'
85+ preLoaderRoute : typeof IndexRouteImport
86+ parentRoute : typeof rootRouteImport
87+ }
88+ }
89+ }
90+
10791const rootRouteChildren : RootRouteChildren = {
10892 IndexRoute : IndexRoute ,
10993 AuthenticateRoute : AuthenticateRoute ,
11094 LoginLazyRoute : LoginLazyRoute ,
11195}
112-
113- export const routeTree = rootRoute
96+ export const routeTree = rootRouteImport
11497 . _addFileChildren ( rootRouteChildren )
11598 . _addFileTypes < FileRouteTypes > ( )
116-
117- /* ROUTE_MANIFEST_START
118- {
119- "routes": {
120- "__root__": {
121- "filePath": "__root.tsx",
122- "children": [
123- "/",
124- "/authenticate",
125- "/login"
126- ]
127- },
128- "/": {
129- "filePath": "index.tsx"
130- },
131- "/authenticate": {
132- "filePath": "authenticate.tsx"
133- },
134- "/login": {
135- "filePath": "login.lazy.tsx"
136- }
137- }
138- }
139- ROUTE_MANIFEST_END */
0 commit comments