diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 9d1f8f414956a21..eb9179d6e92f11c 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -594,7 +594,7 @@ export default async function build( ssgPageRoutes = workerResult.prerenderRoutes } - if (workerResult.prerenderFallback === 'unstable_blocking') { + if (workerResult.prerenderFallback === 'blocking') { ssgBlockingFallbackPages.add(page) } else if (workerResult.prerenderFallback === true) { ssgStaticFallbackPages.add(page) diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 9216875d7e9806c..b4b313418f66d12 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -575,7 +575,7 @@ export async function buildStaticPaths( if ( !( typeof staticPathsResult.fallback === 'boolean' || - staticPathsResult.fallback === 'unstable_blocking' + staticPathsResult.fallback === 'blocking' ) ) { throw new Error( @@ -700,7 +700,7 @@ export async function isPageStatic( hasServerProps?: boolean hasStaticProps?: boolean prerenderRoutes?: string[] | undefined - prerenderFallback?: boolean | 'unstable_blocking' | undefined + prerenderFallback?: boolean | 'blocking' | undefined }> { try { require('../next-server/lib/runtime-config').setConfig(runtimeEnvConfig) @@ -775,7 +775,7 @@ export async function isPageStatic( } let prerenderRoutes: Array | undefined - let prerenderFallback: boolean | 'unstable_blocking' | undefined + let prerenderFallback: boolean | 'blocking' | undefined if (hasStaticProps && hasStaticPaths) { ;({ paths: prerenderRoutes, diff --git a/packages/next/server/next-dev-server.ts b/packages/next/server/next-dev-server.ts index d2b70721c3c0fd2..17944484b967f95 100644 --- a/packages/next/server/next-dev-server.ts +++ b/packages/next/server/next-dev-server.ts @@ -556,7 +556,7 @@ export default class DevServer extends Server { return { staticPaths, fallbackMode: - fallback === 'unstable_blocking' + fallback === 'blocking' ? 'blocking' : fallback === true ? 'static' diff --git a/packages/next/types/index.d.ts b/packages/next/types/index.d.ts index 1f10532657a9764..24e8619f1ede4c6 100644 --- a/packages/next/types/index.d.ts +++ b/packages/next/types/index.d.ts @@ -111,7 +111,7 @@ export type GetStaticPathsContext = { export type GetStaticPathsResult

= { paths: Array - fallback: boolean | 'unstable_blocking' + fallback: boolean | 'blocking' } export type GetStaticPaths

= ( diff --git a/test/integration/prerender/pages/blocking-fallback-once/[slug].js b/test/integration/prerender/pages/blocking-fallback-once/[slug].js index 0d9b4971ba00efe..5b047ded890c0c6 100644 --- a/test/integration/prerender/pages/blocking-fallback-once/[slug].js +++ b/test/integration/prerender/pages/blocking-fallback-once/[slug].js @@ -5,7 +5,7 @@ import { useRouter } from 'next/router' export async function getStaticPaths() { return { paths: [], - fallback: 'unstable_blocking', + fallback: 'blocking', } } diff --git a/test/integration/prerender/pages/blocking-fallback-some/[slug].js b/test/integration/prerender/pages/blocking-fallback-some/[slug].js index a9ccb79b9594f21..dc89af7f5117e43 100644 --- a/test/integration/prerender/pages/blocking-fallback-some/[slug].js +++ b/test/integration/prerender/pages/blocking-fallback-some/[slug].js @@ -5,7 +5,7 @@ import { useRouter } from 'next/router' export async function getStaticPaths() { return { paths: [{ params: { slug: 'a' } }, { params: { slug: 'b' } }], - fallback: 'unstable_blocking', + fallback: 'blocking', } } diff --git a/test/integration/prerender/pages/blocking-fallback/[slug].js b/test/integration/prerender/pages/blocking-fallback/[slug].js index cb2a93e47f07c88..0b39f579352ca6f 100644 --- a/test/integration/prerender/pages/blocking-fallback/[slug].js +++ b/test/integration/prerender/pages/blocking-fallback/[slug].js @@ -5,7 +5,7 @@ import { useRouter } from 'next/router' export async function getStaticPaths() { return { paths: [], - fallback: 'unstable_blocking', + fallback: 'blocking', } } diff --git a/test/integration/prerender/pages/non-json-blocking/[p].js b/test/integration/prerender/pages/non-json-blocking/[p].js index 9d872c8d3fec87c..f7b406bdcb9b94e 100644 --- a/test/integration/prerender/pages/non-json-blocking/[p].js +++ b/test/integration/prerender/pages/non-json-blocking/[p].js @@ -7,7 +7,7 @@ export async function getStaticProps() { } export async function getStaticPaths() { - return { paths: [], fallback: 'unstable_blocking' } + return { paths: [], fallback: 'blocking' } } const Page = ({ time }) => { diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index cab5b95e8f97cbc..c7c8e3b334a059e 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -2101,7 +2101,7 @@ describe('SSG Prerender', () => { await fs.writeFile( pagePath, fallbackBlockingPageContents[page].replace( - "fallback: 'unstable_blocking'", + "fallback: 'blocking'", 'fallback: false' ) )