Which project does this relate to?
Router
Describe the bug
The routeTree.gen.ts generated in versions after @tanstack/router-plugin 1.150.0 is inconsistent with version 1.150.0. I created a test path, and the following code was normal in version 1.150.0, passed the TypeScript check, but in subsequent versions, this code still works normally, but the TypeScript check reports an error.
const router = useRouter();
React.useEffect(() => {
console.log(router.routesByPath['/test']);
}, [router]);
Complete minimal reproducer
https://stackblitz.com/edit/github-shjftka4?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug
- Change "@tanstack/router-plugin": "1.150.0" in package.json to 1.151.0 or any other new version
Expected behavior
Screenshots or Videos
No response
Platform
- Router Version: [e.g. 1.151.0 ]
- OS: [e.g. macOS]
- Browser: [e.g. Chrome]
- Browser Version: [e.g. 91.1]
- Bundler: [e.g. vite]
- Bundler Version: [e.g. 7.0.0]
Additional context
No response
Which project does this relate to?
Router
Describe the bug
The routeTree.gen.ts generated in versions after @tanstack/router-plugin 1.150.0 is inconsistent with version 1.150.0. I created a test path, and the following code was normal in version 1.150.0, passed the TypeScript check, but in subsequent versions, this code still works normally, but the TypeScript check reports an error.
Complete minimal reproducer
https://stackblitz.com/edit/github-shjftka4?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug
Expected behavior
Screenshots or Videos
No response
Platform
Additional context
No response