Skip to content

Commit 4141a5b

Browse files
committed
feat: added fallback route params to prerender manifest
1 parent d7d913a commit 4141a5b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/next/src/build/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ export interface DynamicSsgRoute {
287287
* The status code that should be used when serving the fallback.
288288
*/
289289
fallbackStatus?: number
290+
291+
/**
292+
* The root params that are unknown for this fallback route.
293+
*/
294+
fallbackRootParams: readonly string[] | undefined
295+
290296
prefetchDataRoute: string | null | undefined
291297
prefetchDataRouteRegex: string | null | undefined
292298
routeRegex: string
@@ -3154,6 +3160,7 @@ export default async function build(
31543160
fallbackRevalidate,
31553161
fallbackStatus: meta.status,
31563162
fallbackHeaders: meta.headers,
3163+
fallbackRootParams: route.fallbackRootParams,
31573164
dataRouteRegex: !dataRoute
31583165
? null
31593166
: normalizeRouteRegex(
@@ -3581,6 +3588,7 @@ export default async function build(
35813588
? `${normalizedRoute}.html`
35823589
: false,
35833590
fallbackRevalidate: undefined,
3591+
fallbackRootParams: undefined,
35843592
dataRouteRegex: normalizeRouteRegex(
35853593
getNamedRouteRegex(
35863594
dataRoute.replace(/\.json$/, ''),

0 commit comments

Comments
 (0)