Skip to content

Commit

Permalink
fix(vercel#30300): force export 404.html
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed May 11, 2022
1 parent 375dc17 commit 1ff0113
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/next/export/worker.ts
Expand Up @@ -221,8 +221,13 @@ export default async function exportPage({
// extension of `.slug]`
const pageExt = isDynamic ? '' : extname(page)
const pathExt = isDynamic ? '' : extname(path)

// force output 404.html for backwards compat
if (path === '/404.html') {
htmlFilename = path
}
// Make sure page isn't a folder with a dot in the name e.g. `v1.2`
if (pageExt !== pathExt && pathExt !== '') {
else if (pageExt !== pathExt && pathExt !== '') {
const isBuiltinPaths = ['/500', '/404'].some(
(p) => p === path || p === path + '.html'
)
Expand Down

0 comments on commit 1ff0113

Please sign in to comment.