T
TanStack16mo ago
extended-salmon

Automatically generate file routes on save

Hi newbie here, im really enjoying tanstack router but if i create a new file route, i always rebuild my program with npm run dev so that the routeTree updates properly. is there a way to generate routes automatically on save?
3 Replies
rival-black
rival-black16mo ago
while runing dev this happens automatically. If you rename a file or create a new file that is empty the path changes or in case of the empty file it will prefill it with a fileroute
extended-salmon
extended-salmonOP16mo ago
hi, i dont think it does happen automatically to my codebase as i need to always ctrl c the terminal and run npm run dev so it updates/generates routes
stormy-gold
stormy-gold16mo ago
What is your npm run dev doing? By default the script should run everytime a file is created/updated/deleted and this is handled by vite

Did you find this page helpful?