-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2 route file naming: route file convention not reading route folders correctly #5303
Comments
I used the following structure to wrap the "root" route in a folder;
i.e. |
@ctrlplusb what do you get, when you run |
I guess Given the following layout
produces the following routes output
It seems like some regression removes the first character, which for nested routes without nested URLs removes the underscore and produces a route with path parameter. Applied to your example, |
@confix both of these issues are resolved in #5228 which should have landed in yesterdays release but didn't make the train <Routes>
<Route file="root.tsx">
<Route path="test" file="routes/test.tsx" />
<Route file="routes/_app/index.tsx">
<Route index file="routes/_app._index.tsx" />
</Route>
</Route>
</Routes> |
@mcansh Ah, good to know. Gonna wait then. Thanks! |
Closed by #5228 |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.11.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
1. Create a new Remix project by using
npx create-remix@latest
2. Enable v2 routing convention
3. Create a route folder tree as shown below
4. Run
npx remix routes
to see the evaluated routesExpected Behavior
With the given folder tree above I would expect the output of
npx remix routes
to be as follows:routes/_app/index.tsx
: a pathless route with_app
defining a layout for all other routes prefixed with_app
routes/_app._index.tsx
: an index route nested inside the layout route called_app
Actual Behavior
Currently
npx remix routes
errors when given the folder tree above:When you remove
_app/index.tsx
folder route, you can see the error:routes/_app/index.tsx
should not be recognized as an index route.The text was updated successfully, but these errors were encountered: