Unverified Commit 5e034940 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update manifest to include notFound revalidate info (#30046)

This ensures we include `notFound` routes in the `prerender-manifest` routes so that we have the `revalidate` information available. 
parent 33c687ac
......@@ -1499,17 +1499,15 @@ export default async function build(
for (const locale of i18n.locales) {
const localePage = `/${locale}${page === '/' ? '' : page}`
if (!ssgNotFoundPaths.includes(localePage)) {
finalPrerenderRoutes[localePage] = {
initialRevalidateSeconds:
exportConfig.initialPageRevalidationMap[localePage],
srcRoute: null,
dataRoute: path.posix.join(
'/_next/data',
buildId,
`${file}.json`
),
}
finalPrerenderRoutes[localePage] = {
initialRevalidateSeconds:
exportConfig.initialPageRevalidationMap[localePage],
srcRoute: null,
dataRoute: path.posix.join(
'/_next/data',
buildId,
`${file}.json`
),
}
}
} else {
......
......@@ -793,6 +793,11 @@ export function runTests(ctx) {
\\"srcRoute\\": \\"/gsp/fallback/[slug]\\",
\\"dataRoute\\": \\"/_next/data/BUILD_ID/en/gsp/fallback/always.json\\"
},
\\"/en/not-found\\": {
\\"initialRevalidateSeconds\\": false,
\\"srcRoute\\": null,
\\"dataRoute\\": \\"/_next/data/BUILD_ID/not-found.json\\"
},
\\"/fr\\": {
\\"initialRevalidateSeconds\\": false,
\\"srcRoute\\": null,
......@@ -1002,6 +1007,11 @@ export function runTests(ctx) {
\\"initialRevalidateSeconds\\": false,
\\"srcRoute\\": \\"/gsp/fallback/[slug]\\",
\\"dataRoute\\": \\"/_next/data/BUILD_ID/nl/gsp/fallback/always.json\\"
},
\\"/nl/not-found\\": {
\\"initialRevalidateSeconds\\": false,
\\"srcRoute\\": null,
\\"dataRoute\\": \\"/_next/data/BUILD_ID/not-found.json\\"
}
}"
`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment