-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
I've provided minimal example project that demonstrates a potential bug with the TanStack Router Vite Plugin not detecting and generating when using a non-standard vite root configuration. In this example, the vite root config is set to app in the vite.config.ts file. With this configuration, TanStack Router does not detect tsr.config.json in the project root, but will detect it if the file is moved to the app directory. Once moved to the app directory, the TanStack Router Vite plugin will successfully generate the routes on vite dev boot, but will not detect and re-generate based on adding and removing files in the app/routes directory.
Your Example Website or App
https://github.com/a-maas/ts-router-ex
Steps to Reproduce the Bug or Issue
- Clone this repository
- Run
npm install - Run
npm run dev - Observe that the routes are generated on boot.
- Add a
test.tsxfile to theapp/routesdirectory. - Observe that the routes are not re-generated.
Expected behavior
As a user, I expect the TanStack Router Vite plugin to re-generate routes when I add and remove files from the configured routes directory, even when Vite is configured with a non-standard root.
Screenshots or Videos
No response
Platform
- OS: macOS 14.4
- Browser: N/A
- Editor: VSCode
Additional context
No response