It seems that building a next app for production requires al Link hrefs to be case sensitive where in dev environment these are not case sensitive.
e.g
-pages
|-- index.js
|-- folder
|--page1.js
|--Page2.js
In the app have all hrefs of link in the following style: "/folder/page[1/2]".
All links will work in dev but only the page 1 link will work in production.
I would expect to either have them case sensitive in dev and production or case insensitive in dev and production. Like this it is very hard to isolate the error as it is "Why is non of my pages loading in production but all of them work in dev".
+Edit: Wanted to also quickly add a small thank you note for next. Great stuff, thanks!
macOS filesystem is case insensitive. your production environment filesystem might not be. it might have to do with your platform rather than with next.js?
Ah did not think about that - makes sense though. Noting: Both executed on the same local machine. So there is no difference between production and dev environment.
Hi! I'd like to work on this issue. Could you assign me?
@kgabryje There is already a PR for this https://github.com/zeit/next.js/pull/8848
Related follow-up: Is there a recommended way of making links case insensitive in production on a Linux server? E.g. I'd like users to be able to go to either "/About" or "/about" and have it load the same page.
Obviously, one option that comes to mind would be to create an About.jsx as well as an about.jsx under the pages directory, but this isn't allowed on MacOS (which I'm using to develop locally) because the filesystem is case insensitive.
Thanks!
Most helpful comment
Related follow-up: Is there a recommended way of making links case insensitive in production on a Linux server? E.g. I'd like users to be able to go to either "/About" or "/about" and have it load the same page.
Obviously, one option that comes to mind would be to create an About.jsx as well as an about.jsx under the pages directory, but this isn't allowed on MacOS (which I'm using to develop locally) because the filesystem is case insensitive.
Thanks!