mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[next] missed a prerender for experimentalBypassFor (#10504)
Missed this in https://github.com/vercel/vercel/pull/10497
This commit is contained in:
@@ -865,6 +865,7 @@ export type NextPrerenderedRoutes = {
|
||||
routeRegex: string;
|
||||
dataRoute: string | null;
|
||||
dataRouteRegex: string | null;
|
||||
experimentalBypassFor?: HasField;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -874,6 +875,7 @@ export type NextPrerenderedRoutes = {
|
||||
routeRegex: string;
|
||||
dataRoute: string | null;
|
||||
dataRouteRegex: string | null;
|
||||
experimentalBypassFor?: HasField;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -882,6 +884,7 @@ export type NextPrerenderedRoutes = {
|
||||
routeRegex: string;
|
||||
dataRoute: string | null;
|
||||
dataRouteRegex: string | null;
|
||||
experimentalBypassFor?: HasField;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1094,6 +1097,7 @@ export async function getPrerenderManifest(
|
||||
fallback: string | false;
|
||||
dataRoute: string | null;
|
||||
dataRouteRegex: string | null;
|
||||
experimentalBypassFor?: HasField;
|
||||
};
|
||||
};
|
||||
preview: {
|
||||
@@ -1203,9 +1207,16 @@ export async function getPrerenderManifest(
|
||||
lazyRoutes.forEach(lazyRoute => {
|
||||
const { routeRegex, fallback, dataRoute, dataRouteRegex } =
|
||||
manifest.dynamicRoutes[lazyRoute];
|
||||
let experimentalBypassFor: undefined | HasField;
|
||||
|
||||
if (manifest.version === 4) {
|
||||
experimentalBypassFor =
|
||||
manifest.dynamicRoutes[lazyRoute].experimentalBypassFor;
|
||||
}
|
||||
|
||||
if (typeof fallback === 'string') {
|
||||
ret.fallbackRoutes[lazyRoute] = {
|
||||
experimentalBypassFor,
|
||||
routeRegex,
|
||||
fallback,
|
||||
dataRoute,
|
||||
@@ -1213,6 +1224,7 @@ export async function getPrerenderManifest(
|
||||
};
|
||||
} else if (fallback === null) {
|
||||
ret.blockingFallbackRoutes[lazyRoute] = {
|
||||
experimentalBypassFor,
|
||||
routeRegex,
|
||||
dataRoute,
|
||||
dataRouteRegex,
|
||||
@@ -1221,6 +1233,7 @@ export async function getPrerenderManifest(
|
||||
// Fallback behavior is disabled, all routes would've been provided
|
||||
// in the top-level `routes` key (`staticRoutes`).
|
||||
ret.omittedRoutes[lazyRoute] = {
|
||||
experimentalBypassFor,
|
||||
routeRegex,
|
||||
dataRoute,
|
||||
dataRouteRegex,
|
||||
@@ -1931,10 +1944,13 @@ export const onPrerenderRoute =
|
||||
}
|
||||
srcRoute = null;
|
||||
dataRoute = pr.dataRoute;
|
||||
experimentalBypassFor = pr.experimentalBypassFor;
|
||||
} else if (isOmitted) {
|
||||
initialRevalidate = false;
|
||||
srcRoute = routeKey;
|
||||
dataRoute = prerenderManifest.omittedRoutes[routeKey].dataRoute;
|
||||
experimentalBypassFor =
|
||||
prerenderManifest.omittedRoutes[routeKey].experimentalBypassFor;
|
||||
} else {
|
||||
const pr = prerenderManifest.staticRoutes[routeKey];
|
||||
({
|
||||
@@ -2213,6 +2229,7 @@ export const onPrerenderRoute =
|
||||
fallback: jsonFsRef,
|
||||
group: prerenderGroup,
|
||||
bypassToken: prerenderManifest.bypassToken,
|
||||
experimentalBypassFor,
|
||||
|
||||
...(isNotFound
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user