Vite Plugin - Code Generation issue
A member on my development team implemented tan stack router in our application and was showing off the auto generation feature with Vite on his Mac.
While the app was running he was able to add route files to our routes folder and Vite would pickup the change, triggering the plugin to generate the code boilerplate in the new file and also adding to the generated route tree.
However it doesn’t work the same way on PC for the rest of the team, we have to stop and then restart the app in order for the code generation to trigger.
I’ve been trying to find any similar issues reported but the only issue I saw has been closed and was related to a monorepo structure. There is a comment on there with the same problem I have though, posted after the ticket was closed.
Has anyone else experienced this or have a solution?
7 Replies
fascinating-indigo•2y ago
is this reproducable?
in a minimal complete example?
stormy-goldOP•2y ago
So far it’s reproducible for us on Windows machines using
v1.19.0 release of the router Vite plugin.
I don’t think I can replicate in a sandbox since it’s a Vite plugin.stormy-goldOP•2y ago
https://tanstack.com/router/latest/docs/framework/react/examples/kitchen-sink-react-query-file-based
It doesn’t work on their kitchen sink example. Not sure if Vite in browser works the same locally. It’s worth saying it doesn’t work on the kitchen sink example on Mac either though.
React Router Kitchen Sink React Query File Based Example | TanStack...
An example showing how to implement Kitchen Sink React Query File Based in React Router
fascinating-indigo•2y ago
please create a GitHub issue about this. we need someone with a Windows machine to have a look, most of the router devs seem to use a Mac ..
stormy-goldOP•2y ago
Will do
stormy-goldOP•2y ago
GitHub
Vite Plugin Route file generation does not work while Vite is runni...
Describe the bug We just implemented router in our application and developers with Mac machines have the code generation feature working while Vite is running, it picks up new files and file change...
rival-black•2y ago
I have similiar issues on MacOS, with new created route files. I added my observations as a comment to the issue.