T
TanStack9mo ago
passive-yellow

Index route not loading by default

Hey all, I have a pretty simple setup where I've defined a __root.tsx file and an index.tsx (basically following the tutorial) This works fine in dev mode, but when I do a production build, the app loads with a not found. In the tanstack dev tools, The matcher is only matching on __root__ so the <Outlet /> is rendering Not Found. When I click on the "Home" link, it routes to the correct place and everything is fine. I am not building this for the web, but for electron-vite - so not sure if that has any implications. Does anyone have any ideas what I 'm doing wrong? Happy to post my route gen file too. the first screenshot shows the tanstack dev tools in my prod built app. The second is on open for dev mode, the third is just the details of the / route in dev. I'm able to kind of game it by setting the notFoundComponent to my home component, but that is def not ideal. Any help is appreciated.
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?