-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Bug?]: rename the index.tsx file to the name of the folder always gives a 404 #1510
Comments
This is a misunderstanding I think.
You want
Same name convention is around nesting layouts being the same name as a folder. Otherwise we follow the index convention. We just have it so empty is also the same index. And everything between
|
Thank you for your reply @ryansolid Two things I like to add: The documentation is pretty clear on how this should work (unless I really don't understand it):
I don't want to be nitpicky, just trying things out and I really would like to avoid a lot of 'index.tsx' files all over the place. |
The doc https://docs.solidjs.com/solid-start/building-your-application/routing#renaming-index uses It also does not mention about putting the folder name in brackets.
|
I tried @baoxdev solution and it works. How to add a layout to this? |
Update: It worked after a browser hard refresh. It seems that the dev server does not automatically invalidate browser cache? |
Duplicates
Latest version
Current behavior 😯
As per documentation you should be able to rename the file to match the directory but that always (even in production build) returns a 404.
PS: congrets on reaching v1 ;-)
Expected behavior 🤔
The route should be rendered.
Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
The text was updated successfully, but these errors were encountered: