Skip to content
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

incorrect warning about index routes having child routes #5828

Closed
ryanflorence opened this issue Mar 16, 2023 · 2 comments · Fixed by #5634
Closed

incorrect warning about index routes having child routes #5828

ryanflorence opened this issue Mar 16, 2023 · 2 comments · Fixed by #5634

Comments

@ryanflorence
Copy link
Member

If you have a file system that looks like this:

routes/
  _index/
    route.tsx
    blocks/
      index.tsx

remix build throws an error:

Error: Child routes are not allowed in index routes. Please remove child routes of _index

It does the same if you use blocks/route.tsx as well.

The code shouldn't be digging that deep in the first place to even register that there might a route definition. It should only be looking for routes at: routes/*.tsx and routes/*/route.tsx.

There's no reason for it to be digging deeper, you should be able to name things whatever you want once you're in a route folder aside from folder/route.tsx and folder/index.tsx.

@mcansh mcansh linked a pull request Mar 16, 2023 that will close this issue
2 tasks
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-4d86674-20230321 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@mcansh
Copy link
Collaborator

mcansh commented Apr 10, 2023

fixed by the improvements made in 1.15 #5634

@mcansh mcansh closed this as completed Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants