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
next export
with exportPathMap
in next.config.js
creates a duplicate 404.html.html
#36855
Comments
next export
with exportPathMap
in next.config.js
creates duplicates 404.html and 404.html.htmlnext export
with exportPathMap
in next.config.js
creates a duplicate 404.html.html
I think #36827 fixed this already. |
@hanneslund I don't think this PR fixes the same issue. I understand why the export of next.js/packages/next/export/index.ts Line 426 in e8a8220
|
The issue should be solved by #36827 already. I have forked your stackblitz reproduction, and updated Next.js to the |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
This is actually a following of #33464.
Running
yarn build && yarn export
while using an updatedexportPathMap
innext.config.js
leads to the creation of an extra404.html.html
file in export. It only happens if the object returned fromexportPathMap
doesn't have a key named/404
.next.js/packages/next/export/index.ts
Line 421 in e8a8220
For example, my goal was to create each page in an
index.html
in a directory with the same name (ie./about.html
becomes/about/index.html
):When using this
next.config.js
, the export produces an extra404.html.html
file (ie. the bug happens)...... while when using this one, it doesn't happen:
Expected Behavior
The
404.html.html
page should not be created when using a customexportPathMap
innext.config.js
.To Reproduce
npx next build && npx next export
in the terminal404.html.html
has been created in theout/
directoryThe text was updated successfully, but these errors were encountered: