Comments (8)
@SeanCassiere thanks a ton, it's working now 🎉
Happy routing! 🐣
from router.
@usmanabdurrehman I experienced the same issue on MacOS. Upgrading vite
and @vitejs/plugin-react
to the latest version fixed the issue for me.
from router.
I have the same problem on MacOS. It also appears if a route file is renamed, in the renamed file the path to createFileRoute
is not updated (and not "Regenerating routes..." message on console).
I tried several ways and that's what i found (MacOS, Router Vite Plugin 1.19.6
). In general it seems, the generator does not run on created or removed but only on modified files:
Inside your route
folder:
touch
a new file (in my test it's zsh):touch hello.tsx
-> generator does not runtouch
the same file again:touch hello.tsx
-> generator does run
That also seems to work for files that have been added in between
-
touch a.tsx # NOT run touch b.tsx # NOT run touch c.tsx # NOT run # touch one of the new routes again touch a.tsx # Routes for a, b AND c _are_ all generated at once
Removing files: given a.tsx
and b.tsx
are existing route files, for that the generator already had been run before:
-
rm a.tsx # NOT run touch b.tsx # run, updates routeTree.gen.ts and removes /a
Hope that helps. Please let me know if there is anything I can do to help you.
from router.
I made some changes to the hook that our vite plugin was using to watch for changes. It went out with release 1.24.1.
@natejboucher - could you check if this has made any impact to the experience on Windows?
@nilshartmann - could you also confirm this against your scenarios that you listed?
from router.
@natejboucher when you have chance, could you confirm if this change made any impact to the Windows experience?
You can download the Router Stackblitz Starter and quickly test it with the latest version of TanStack Router with the Vite Plugin.
from router.
Closing for now.
@natejboucher if this fix that went out with the release from this comment didn't fix the problem on Windows, please let us know.
from router.
@SeanCassiere This problem still exists on windows. I am using @tanstack/router-vite-plugin ^1.28.2
which is the latest version rn. Routes only get updated in routeTree.gen.ts
when we restart the server. Link for example project if you want to test on a windows VM https://github.com/usmanabdurrehman/tanstack-router-tutorials
from router.
@visualjerk 😭 man. Thank you so much. I thought when making apps with vite it would automatically install the latest vite versions but it was way behind. Thanks for the help 👍
from router.
Related Issues (20)
- Redirect Not Working as Expected in @tanstack/react-router v1.31.1 HOT 12
- the `context` in the `onEnter` is callback on the Route definition returns `undefined` on first-load during runtime
- Context is undefined after redirect HOT 21
- Cannot open router website in "https://tanstack.com/router/latest" HOT 13
- `MatchRoute`'s `to` props no longer infers path correctly in v1.31.0
- redirects thrown in the __root beforeLoad aren't showing the correct route on first-load HOT 30
- Paths keep getting appended HOT 5
- Redirect not work with direct url HOT 2
- Navigating between routes returns notFoundComponent HOT 5
- Rerendering root router component twice (even without StrictMode) HOT 4
- `parentMatchPromise` is `undefined` in the loader of a child route
- Redirect not showing correct components but will append the correct URL HOT 6
- Link's `_asChild` / `createLink` do not forward all props HOT 2
- Vite Plugin not re-generating routes with a non-standard Vite root configured HOT 5
- `notFoundComponent` doesn't render when `notFound` is thrown in the loader since 1.28.2 HOT 1
- router status never changes from "pending"
- `beforeLoad` does not wait for async functions to resolve HOT 17
- A component suspended while responding to synchronous input in version 1.31.9 HOT 18
- In Memory Router requires links be pressed multiple times after history.back() is called
- `navigate` functions without `to` but with `search` causes a route error inside a layout route. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.