-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Provide an option to use custom folder name instead of _next #9460
Comments
We're not planning to allow changing the _next folder name as of currently. |
@timneutkens any advices on how we can wrap the app then? |
@andrey-semin I handled this issue via Nginx Routing. What i assumed while making this Nginx Routing is that every file will have unique hash and file name combination. This is the snippet of code of Nginx Routing which i used.
What the above code does is, whenever Nginx encounters /_next/ it will first try that URL with @server1, if that Server responds with 404, the Nginx then transfers the request to @server2 as mentioned in error_page param. This example works like: This worked for me as i had 2 apps which were developed on Next and both has _next route. Let me know if this solves your problem. |
Hello, I'm trying to figure out why but for the moment, deploying on gh-pages doesn't work well. I succeeded to deploy my website, everything is quite ok but the folder As they use by default jekyll, I'm pretty sure that any files named with So yeah, it could be great to be able to change this name. |
I think I found the solution: https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/ |
I'm facing this issue currently as using nginx to micro frontends @NimitMak what is your logic behind using three servers for this? |
@kang-chen This was before we had basepath support from Nextjs, so we had 3 different apps running on next.js and each had _next folder, that's why we needed to add 3 different servers in the Nginx config which will check for respective files in each _next path, so that we don't encounter 404. Let me know if you need more details. |
Any updates on this? |
Doesn't seem to work for GH pages ... although I can confirm doing something like |
Btw ~ the |
Not allowing this to be configurable is turning out to be a blocker for me to use Next.js entirely. |
The underscore is breaking things for many use cases. I think it is worth to keep this issue open. Thanks. |
any updates!? |
+1 allowing to change _next to another name would be really useful in many cases, or at least an option for the generator to exclude certain characters such as the underscore |
Using Next + Static Export cannot be used to write a chrome extension because of this limitation. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Feature request
Is your feature request related to a problem? Please describe.
We tried to run
next export
command to generate static assets and to pack our app with cordova or capacitor. It turns out that those engines omit any folders that begin with an underscore without warning. And once you runnext export
some of the files are put inside of_next
directory. So, to run the app one has to find a way to rename this folder and all links inside generated files not to include underscore.Describe the solution you'd like
It would be really nice to have an option available in
next.config.js
to provide a name of that directory to be used instead of_next
.The text was updated successfully, but these errors were encountered: