diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index 0b7378cc0171e7..96f02bff0a4d3d 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -287,6 +287,12 @@ export interface DynamicSsgRoute { * The status code that should be used when serving the fallback. */ fallbackStatus?: number + + /** + * The root params that are unknown for this fallback route. + */ + fallbackRootParams: readonly string[] | undefined + prefetchDataRoute: string | null | undefined prefetchDataRouteRegex: string | null | undefined routeRegex: string @@ -3154,6 +3160,7 @@ export default async function build( fallbackRevalidate, fallbackStatus: meta.status, fallbackHeaders: meta.headers, + fallbackRootParams: route.fallbackRootParams, dataRouteRegex: !dataRoute ? null : normalizeRouteRegex( @@ -3581,6 +3588,7 @@ export default async function build( ? `${normalizedRoute}.html` : false, fallbackRevalidate: undefined, + fallbackRootParams: undefined, dataRouteRegex: normalizeRouteRegex( getNamedRouteRegex( dataRoute.replace(/\.json$/, ''),