@vercel/next 4.0.4 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -1
- package/dist/server-build.js +1 -1
- package/dist/utils.js +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -43407,7 +43407,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, functionsConfi
|
|
43407
43407
|
let nextServerBuildTrace;
|
43408
43408
|
let instrumentationHookBuildTrace;
|
43409
43409
|
const useBundledServer = semver_1.default.gte(nextVersion, BUNDLED_SERVER_NEXT_VERSION) &&
|
43410
|
-
process.env.VERCEL_NEXT_BUNDLED_SERVER;
|
43410
|
+
process.env.VERCEL_NEXT_BUNDLED_SERVER === '1';
|
43411
43411
|
if (useBundledServer) {
|
43412
43412
|
(0, build_utils_1.debug)('Using bundled Next.js server');
|
43413
43413
|
}
|
@@ -45467,8 +45467,14 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
45467
45467
|
});
|
45468
45468
|
lazyRoutes.forEach(lazyRoute => {
|
45469
45469
|
const { routeRegex, fallback, dataRoute, dataRouteRegex } = manifest.dynamicRoutes[lazyRoute];
|
45470
|
+
let experimentalBypassFor;
|
45471
|
+
if (manifest.version === 4) {
|
45472
|
+
experimentalBypassFor =
|
45473
|
+
manifest.dynamicRoutes[lazyRoute].experimentalBypassFor;
|
45474
|
+
}
|
45470
45475
|
if (typeof fallback === 'string') {
|
45471
45476
|
ret.fallbackRoutes[lazyRoute] = {
|
45477
|
+
experimentalBypassFor,
|
45472
45478
|
routeRegex,
|
45473
45479
|
fallback,
|
45474
45480
|
dataRoute,
|
@@ -45477,6 +45483,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
45477
45483
|
}
|
45478
45484
|
else if (fallback === null) {
|
45479
45485
|
ret.blockingFallbackRoutes[lazyRoute] = {
|
45486
|
+
experimentalBypassFor,
|
45480
45487
|
routeRegex,
|
45481
45488
|
dataRoute,
|
45482
45489
|
dataRouteRegex,
|
@@ -45486,6 +45493,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
45486
45493
|
// Fallback behavior is disabled, all routes would've been provided
|
45487
45494
|
// in the top-level `routes` key (`staticRoutes`).
|
45488
45495
|
ret.omittedRoutes[lazyRoute] = {
|
45496
|
+
experimentalBypassFor,
|
45489
45497
|
routeRegex,
|
45490
45498
|
dataRoute,
|
45491
45499
|
dataRouteRegex,
|
@@ -45936,11 +45944,14 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
45936
45944
|
}
|
45937
45945
|
srcRoute = null;
|
45938
45946
|
dataRoute = pr.dataRoute;
|
45947
|
+
experimentalBypassFor = pr.experimentalBypassFor;
|
45939
45948
|
}
|
45940
45949
|
else if (isOmitted) {
|
45941
45950
|
initialRevalidate = false;
|
45942
45951
|
srcRoute = routeKey;
|
45943
45952
|
dataRoute = prerenderManifest.omittedRoutes[routeKey].dataRoute;
|
45953
|
+
experimentalBypassFor =
|
45954
|
+
prerenderManifest.omittedRoutes[routeKey].experimentalBypassFor;
|
45944
45955
|
}
|
45945
45956
|
else {
|
45946
45957
|
const pr = prerenderManifest.staticRoutes[routeKey];
|
@@ -46154,6 +46165,7 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
46154
46165
|
fallback: jsonFsRef,
|
46155
46166
|
group: prerenderGroup,
|
46156
46167
|
bypassToken: prerenderManifest.bypassToken,
|
46168
|
+
experimentalBypassFor,
|
46157
46169
|
...(isNotFound
|
46158
46170
|
? {
|
46159
46171
|
initialStatus: 404,
|
package/dist/server-build.js
CHANGED
@@ -126,7 +126,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, functionsConfi
|
|
126
126
|
let nextServerBuildTrace;
|
127
127
|
let instrumentationHookBuildTrace;
|
128
128
|
const useBundledServer = semver_1.default.gte(nextVersion, BUNDLED_SERVER_NEXT_VERSION) &&
|
129
|
-
process.env.VERCEL_NEXT_BUNDLED_SERVER;
|
129
|
+
process.env.VERCEL_NEXT_BUNDLED_SERVER === '1';
|
130
130
|
if (useBundledServer) {
|
131
131
|
(0, build_utils_1.debug)('Using bundled Next.js server');
|
132
132
|
}
|
package/dist/utils.js
CHANGED
@@ -719,8 +719,14 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
719
719
|
});
|
720
720
|
lazyRoutes.forEach(lazyRoute => {
|
721
721
|
const { routeRegex, fallback, dataRoute, dataRouteRegex } = manifest.dynamicRoutes[lazyRoute];
|
722
|
+
let experimentalBypassFor;
|
723
|
+
if (manifest.version === 4) {
|
724
|
+
experimentalBypassFor =
|
725
|
+
manifest.dynamicRoutes[lazyRoute].experimentalBypassFor;
|
726
|
+
}
|
722
727
|
if (typeof fallback === 'string') {
|
723
728
|
ret.fallbackRoutes[lazyRoute] = {
|
729
|
+
experimentalBypassFor,
|
724
730
|
routeRegex,
|
725
731
|
fallback,
|
726
732
|
dataRoute,
|
@@ -729,6 +735,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
729
735
|
}
|
730
736
|
else if (fallback === null) {
|
731
737
|
ret.blockingFallbackRoutes[lazyRoute] = {
|
738
|
+
experimentalBypassFor,
|
732
739
|
routeRegex,
|
733
740
|
dataRoute,
|
734
741
|
dataRouteRegex,
|
@@ -738,6 +745,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
738
745
|
// Fallback behavior is disabled, all routes would've been provided
|
739
746
|
// in the top-level `routes` key (`staticRoutes`).
|
740
747
|
ret.omittedRoutes[lazyRoute] = {
|
748
|
+
experimentalBypassFor,
|
741
749
|
routeRegex,
|
742
750
|
dataRoute,
|
743
751
|
dataRouteRegex,
|
@@ -1188,11 +1196,14 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1188
1196
|
}
|
1189
1197
|
srcRoute = null;
|
1190
1198
|
dataRoute = pr.dataRoute;
|
1199
|
+
experimentalBypassFor = pr.experimentalBypassFor;
|
1191
1200
|
}
|
1192
1201
|
else if (isOmitted) {
|
1193
1202
|
initialRevalidate = false;
|
1194
1203
|
srcRoute = routeKey;
|
1195
1204
|
dataRoute = prerenderManifest.omittedRoutes[routeKey].dataRoute;
|
1205
|
+
experimentalBypassFor =
|
1206
|
+
prerenderManifest.omittedRoutes[routeKey].experimentalBypassFor;
|
1196
1207
|
}
|
1197
1208
|
else {
|
1198
1209
|
const pr = prerenderManifest.staticRoutes[routeKey];
|
@@ -1406,6 +1417,7 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1406
1417
|
fallback: jsonFsRef,
|
1407
1418
|
group: prerenderGroup,
|
1408
1419
|
bypassToken: prerenderManifest.bypassToken,
|
1420
|
+
experimentalBypassFor,
|
1409
1421
|
...(isNotFound
|
1410
1422
|
? {
|
1411
1423
|
initialStatus: 404,
|