-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
V2 routing root index path issue #5216
Comments
Can you check if 1.11.1 works for you? |
I'm seeing the same issue on 1.11.1 as well. If I have When changing the filename to My content then does not appear at I've made a repo to reproduce is here - https://github.com/Deanmv/remix-issue-5216 |
@Deanmv index routes in v2 routing must be named flat-files flat-folders |
@kiliman ah, looks like I've misunderstood that then. Ignore me 😄 Thanks for the example! |
Route File Naming (v2) #folders-for-organization By "Can also" does that mean by opting into the v1 convention? or that you can use index.tsx in folders with new v2 conventions. |
@ianhernandez it's for V2 |
@ianhernandez the "can also" refers to v2 convention, a route can be a |
I believe there is still an issue in Remix If I understand everything correctly, this is how the convention should work, but running Changing the structure to the following: fixes the error, and running
which seems incorrect (though I'm not sure), but the contents of Edit 2: With the former file structure, placing the layout in |
Just did the 15 min tutorial with the indie stack and can confirm - had to change |
Yes, the transition to v2 routes will be messy, with so many tutorials still showing the old routing convention. Unfortunately, it's not backward compatible. I have a migration script to go from v1 to v2 (flat routes). It's part of my |
This needs to be highlighted in the blog tutorial, as it is currently broken. Either a quick fix of switching back to v1 routes or updating the tutorial to v2 routing. Edit: looks like there is already an issue open in the examples repo: remix-run/examples#196 |
Fixed by #5959 |
What version of Remix are you using?
1.11.0
Steps to Reproduce
npx create-remix@latest
Switch to V2 routing, and run
remix routes
Expected Behavior
After the 1.11 update, leaf
index.tsx
routes should be recognised by the routing system (This works with remix-flat-routes)./routes/index.tsx
<Route index file="routes/index.tsx" />
/routes/test/index.tsx
<Route path="test" file="routes/test/index.tsx" />
Actual Behavior
/routes/index.tsx
<Route path="index" file="routes/index.tsx" />
/routes/test/index.tsx
<Route path="test" file="routes/test/index.tsx" />
The text was updated successfully, but these errors were encountered: