-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
information neededFurther information is requestedFurther information is requested
Description
Which project does this relate to?
Router
Describe the bug
I upgraded @tanstack/router-cli from ^1.141.2 => ^1.141.7
This made drastic changes to my routeTree.gen.ts file, namely it changed importing regular routes to importing their lazy variants. For example:
// BEFORE
const DashboardIndexLazyRoute = DashboardIndexLazyRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => DashboardRouteRoute,
} as any).lazy(() =>
import('./routes/dashboard/index.lazy').then((d) => d.Route),
)
// AFTER
const DashboardIndexLazyRoute = DashboardIndexLazyRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => DashboardRouteLazyRoute,
} as any).lazy(() =>
import('./routes/dashboard/index.lazy').then((d) => d.Route),
)No routes are found now, presumable because it's trying to load the lazy file before it loads the regular file.
Your Example Website or App
Steps to Reproduce the Bug or Issue
// BEFORE
const DashboardIndexLazyRoute = DashboardIndexLazyRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => DashboardRouteRoute,
} as any).lazy(() =>
import('./routes/dashboard/index.lazy').then((d) => d.Route),
)
// AFTER
const DashboardIndexLazyRoute = DashboardIndexLazyRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => DashboardRouteLazyRoute,
} as any).lazy(() =>
import('./routes/dashboard/index.lazy').then((d) => d.Route),
)Expected behavior
Lazy routes should not loaded before regular routes.
Screenshots or Videos
No response
Platform
- Router / Start Version: [e.g. 1.121.0]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Browser Version: [e.g. 91.1]
- Bundler: [e.g. vite]
- Bundler Version: [e.g. 7.0.0]
Additional context
No response
Cahllagerfeld, Gruak, gerynugrh and Xhale1coderabbitai and gerynugrh
Metadata
Metadata
Assignees
Labels
information neededFurther information is requestedFurther information is requested