Skip to content

Commit 9db06dd

Browse files
committed
fix: publish 404 and 500 to cdn
1 parent 9ec7992 commit 9db06dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/runtime/src/helpers/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export const moveStaticPages = async ({
150150
}
151151
}
152152
// Move all static files, except error documents and nft manifests
153-
const pages = await globby(['{app,pages}/**/*.{html,json,rsc}', '!**/(500|404|*.js.nft).{html,json}'], {
153+
const pages = await globby(['{app,pages}/**/*.{html,json,rsc}', '!**/*.js.nft.{html,json}'], {
154154
cwd: outputDir,
155155
dot: true,
156156
})

packages/runtime/src/helpers/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const redirectsForNext404Route = ({
170170
}): NetlifyConfig['redirects'] =>
171171
netlifyRoutesForNextRoute({ route, buildId, i18n }).map(({ redirect, locale }) => ({
172172
from: `${basePath}${redirect}`,
173-
to: locale ? `${basePath}/server/pages/${locale}/404.html` : `${basePath}/server/pages/404.html`,
173+
to: locale ? `${basePath}/${locale}/404.html` : `${basePath}/404.html`,
174174
status: 404,
175175
force,
176176
}))

0 commit comments

Comments
 (0)