From b854804f32a2f77698747dc13c27948b667d0d7f Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Wed, 22 Feb 2023 22:23:10 +0100 Subject: [PATCH] fix prerendering --- packages/next/src/build/index.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index 7773c6f70593b..e01644fc36263 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -1435,22 +1435,11 @@ export default async function build( isSsg = true } - const isDynamic = isDynamicRoute(page) - const isDynamicPageWithoutGenerateStaticParams = - isDynamic && !workerResult.prerenderRoutes - if (workerResult.appConfig?.revalidate !== 0) { - if (!isDynamic) { + if (!isDynamicRoute(page)) { appStaticPaths.set(originalAppPath, [page]) appStaticPathsEncoded.set(originalAppPath, [page]) isStatic = true - } else if (isDynamicPageWithoutGenerateStaticParams) { - // Do not prerender with the empty slug name if there - // is no generateStaticParams provided. - // https://github.com/vercel/next.js/issues/45850 - appStaticPaths.set(originalAppPath, []) - appStaticPathsEncoded.set(originalAppPath, []) - isStatic = true } }