-
Notifications
You must be signed in to change notification settings - Fork 30k
Closed
Description
Here's an example folder structure (as silly as it may be)
pages/
- subpage/
- index.js
- subpage.js
If I have a <Link/> point to /subpage/ the client will render the component from subpage.js, but when I refresh the page, I get the subpage/index.js file rendered.
At first I noticed this was an issue with the server routing not working well if the path ends with a /, but then I realized that there are cases in which you may want an index.js in a folder, so it's not necessarily problematic that you get a 404 when you don't have the index.js.
However, when there's a naming collision between a file and a folder, the client and the server behave differently and I think there should be a discussion around this situation, because I can't say there's a clear solution at this point.
thisbejim, matheuss, jlobos, reneruiz, maniart and 2 more
Metadata
Metadata
Assignees
Labels
No labels