Skip to content

Commit

Permalink
feat: added fallback route params to prerender manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Dec 16, 2024
1 parent f8063e7 commit 4f61386
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3154,6 +3160,7 @@ export default async function build(
fallbackRevalidate,
fallbackStatus: meta.status,
fallbackHeaders: meta.headers,
fallbackRootParams: route.fallbackRootParams,
dataRouteRegex: !dataRoute
? null
: normalizeRouteRegex(
Expand Down Expand Up @@ -3581,6 +3588,7 @@ export default async function build(
? `${normalizedRoute}.html`
: false,
fallbackRevalidate: undefined,
fallbackRootParams: undefined,
dataRouteRegex: normalizeRouteRegex(
getNamedRouteRegex(
dataRoute.replace(/\.json$/, ''),
Expand Down

0 comments on commit 4f61386

Please sign in to comment.