@vercel/next 4.5.1 → 4.5.2
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 +216 -69
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -790,17 +790,43 @@ var require_dist2 = __commonJS({
|
|
790
790
|
}
|
791
791
|
});
|
792
792
|
|
793
|
-
//
|
794
|
-
var
|
795
|
-
"
|
793
|
+
// ../routing-utils/dist/superstatic.js
|
794
|
+
var require_superstatic = __commonJS({
|
795
|
+
"../routing-utils/dist/superstatic.js"(exports, module2) {
|
796
796
|
"use strict";
|
797
|
-
Object.defineProperty
|
798
|
-
|
799
|
-
var
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
797
|
+
var __defProp2 = Object.defineProperty;
|
798
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
799
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
800
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
801
|
+
var __export2 = (target, all) => {
|
802
|
+
for (var name in all)
|
803
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
804
|
+
};
|
805
|
+
var __copyProps2 = (to, from, except, desc) => {
|
806
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
807
|
+
for (let key of __getOwnPropNames2(from))
|
808
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
809
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
810
|
+
}
|
811
|
+
return to;
|
812
|
+
};
|
813
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
814
|
+
var superstatic_exports = {};
|
815
|
+
__export2(superstatic_exports, {
|
816
|
+
collectHasSegments: () => collectHasSegments,
|
817
|
+
convertCleanUrls: () => convertCleanUrls,
|
818
|
+
convertHeaders: () => convertHeaders2,
|
819
|
+
convertRedirects: () => convertRedirects2,
|
820
|
+
convertRewrites: () => convertRewrites2,
|
821
|
+
convertTrailingSlash: () => convertTrailingSlash,
|
822
|
+
getCleanUrls: () => getCleanUrls,
|
823
|
+
pathToRegexp: () => pathToRegexp,
|
824
|
+
sourceToRegex: () => sourceToRegex
|
825
|
+
});
|
826
|
+
module2.exports = __toCommonJS2(superstatic_exports);
|
827
|
+
var import_url4 = require("url");
|
828
|
+
var import_path_to_regexp = require_dist();
|
829
|
+
var import_path_to_regexp_updated = require_dist2();
|
804
830
|
function cloneKeys(keys) {
|
805
831
|
if (typeof keys === "undefined") {
|
806
832
|
return void 0;
|
@@ -814,10 +840,10 @@ var require_dist3 = __commonJS({
|
|
814
840
|
}
|
815
841
|
function pathToRegexp(callerId, path5, keys, options) {
|
816
842
|
const newKeys = cloneKeys(keys);
|
817
|
-
const currentRegExp = (0,
|
843
|
+
const currentRegExp = (0, import_path_to_regexp.pathToRegexp)(path5, keys, options);
|
818
844
|
try {
|
819
845
|
const currentKeys = keys;
|
820
|
-
const newRegExp = (0,
|
846
|
+
const newRegExp = (0, import_path_to_regexp_updated.pathToRegexp)(path5, newKeys, options);
|
821
847
|
const isDiffRegExp = currentRegExp.toString() !== newRegExp.toString();
|
822
848
|
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffRegExp) {
|
823
849
|
const message = JSON.stringify({
|
@@ -846,45 +872,6 @@ var require_dist3 = __commonJS({
|
|
846
872
|
}
|
847
873
|
return currentRegExp;
|
848
874
|
}
|
849
|
-
exports.pathToRegexp = pathToRegexp;
|
850
|
-
}
|
851
|
-
});
|
852
|
-
|
853
|
-
// ../routing-utils/dist/superstatic.js
|
854
|
-
var require_superstatic = __commonJS({
|
855
|
-
"../routing-utils/dist/superstatic.js"(exports, module2) {
|
856
|
-
"use strict";
|
857
|
-
var __defProp2 = Object.defineProperty;
|
858
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
859
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
860
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
861
|
-
var __export2 = (target, all) => {
|
862
|
-
for (var name in all)
|
863
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
864
|
-
};
|
865
|
-
var __copyProps2 = (to, from, except, desc) => {
|
866
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
867
|
-
for (let key of __getOwnPropNames2(from))
|
868
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
869
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
870
|
-
}
|
871
|
-
return to;
|
872
|
-
};
|
873
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
874
|
-
var superstatic_exports = {};
|
875
|
-
__export2(superstatic_exports, {
|
876
|
-
collectHasSegments: () => collectHasSegments,
|
877
|
-
convertCleanUrls: () => convertCleanUrls,
|
878
|
-
convertHeaders: () => convertHeaders2,
|
879
|
-
convertRedirects: () => convertRedirects2,
|
880
|
-
convertRewrites: () => convertRewrites2,
|
881
|
-
convertTrailingSlash: () => convertTrailingSlash,
|
882
|
-
getCleanUrls: () => getCleanUrls,
|
883
|
-
sourceToRegex: () => sourceToRegex
|
884
|
-
});
|
885
|
-
module2.exports = __toCommonJS2(superstatic_exports);
|
886
|
-
var import_url4 = require("url");
|
887
|
-
var import_path_to_regexp = require_dist3();
|
888
875
|
var UN_NAMED_SEGMENT = "__UN_NAMED_SEGMENT__";
|
889
876
|
function getCleanUrls(filePaths) {
|
890
877
|
const htmlFiles = filePaths.map(toRoute).filter((f) => f.endsWith(".html")).map((f) => ({
|
@@ -1040,7 +1027,7 @@ var require_superstatic = __commonJS({
|
|
1040
1027
|
}
|
1041
1028
|
function sourceToRegex(source) {
|
1042
1029
|
const keys = [];
|
1043
|
-
const r =
|
1030
|
+
const r = pathToRegexp("632", source, keys, {
|
1044
1031
|
strict: true,
|
1045
1032
|
sensitive: true,
|
1046
1033
|
delimiter: "/"
|
@@ -1113,9 +1100,9 @@ var require_superstatic = __commonJS({
|
|
1113
1100
|
const hashKeys = [];
|
1114
1101
|
const hostnameKeys = [];
|
1115
1102
|
try {
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1103
|
+
pathToRegexp("528", pathname, pathnameKeys);
|
1104
|
+
pathToRegexp("834", hash || "", hashKeys);
|
1105
|
+
pathToRegexp("712", hostname || "", hostnameKeys);
|
1119
1106
|
} catch (_) {
|
1120
1107
|
}
|
1121
1108
|
destParams = new Set(
|
@@ -11136,7 +11123,8 @@ async function getDynamicRoutes({
|
|
11136
11123
|
bypassToken,
|
11137
11124
|
isServerMode,
|
11138
11125
|
dynamicMiddlewareRouteMap,
|
11139
|
-
isAppPPREnabled
|
11126
|
+
isAppPPREnabled,
|
11127
|
+
isAppClientSegmentCacheEnabled
|
11140
11128
|
}) {
|
11141
11129
|
if (routesManifest) {
|
11142
11130
|
switch (routesManifest.version) {
|
@@ -11169,7 +11157,13 @@ async function getDynamicRoutes({
|
|
11169
11157
|
routes2.push(route2);
|
11170
11158
|
continue;
|
11171
11159
|
}
|
11172
|
-
const {
|
11160
|
+
const {
|
11161
|
+
page,
|
11162
|
+
namedRegex,
|
11163
|
+
regex,
|
11164
|
+
routeKeys,
|
11165
|
+
prefetchSegmentDataRoutes
|
11166
|
+
} = params;
|
11173
11167
|
const route = {
|
11174
11168
|
src: namedRegex || regex,
|
11175
11169
|
dest: `${!isDev ? import_path2.default.posix.join("/", entryDirectory, page) : page}${routeKeys ? `?${Object.keys(routeKeys).map((key) => `${routeKeys[key]}=$${key}`).join("&")}` : ""}`
|
@@ -11190,6 +11184,20 @@ async function getDynamicRoutes({
|
|
11190
11184
|
}
|
11191
11185
|
];
|
11192
11186
|
}
|
11187
|
+
if (isAppClientSegmentCacheEnabled && prefetchSegmentDataRoutes && prefetchSegmentDataRoutes.length > 0) {
|
11188
|
+
for (const prefetchSegmentDataRoute of prefetchSegmentDataRoutes) {
|
11189
|
+
routes2.push({
|
11190
|
+
...route,
|
11191
|
+
src: prefetchSegmentDataRoute.source,
|
11192
|
+
dest: `${!isDev ? import_path2.default.posix.join(
|
11193
|
+
"/",
|
11194
|
+
entryDirectory,
|
11195
|
+
prefetchSegmentDataRoute.destination
|
11196
|
+
) : prefetchSegmentDataRoute.destination}${routeKeys ? `?${Object.entries(routeKeys).map(([key, value]) => `${value}=$${key}`).join("&")}` : ""}`,
|
11197
|
+
check: true
|
11198
|
+
});
|
11199
|
+
}
|
11200
|
+
}
|
11193
11201
|
if (isAppPPREnabled) {
|
11194
11202
|
let dest = route.dest?.replace(/($|\?)/, ".prefetch.rsc$1");
|
11195
11203
|
if (page === "/" || page === "/index") {
|
@@ -12129,7 +12137,8 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12129
12137
|
routesManifest,
|
12130
12138
|
isCorrectNotFoundRoutes,
|
12131
12139
|
isEmptyAllowQueryForPrendered,
|
12132
|
-
isAppPPREnabled
|
12140
|
+
isAppPPREnabled,
|
12141
|
+
isAppClientSegmentCacheEnabled
|
12133
12142
|
} = prerenderRouteArgs;
|
12134
12143
|
if (isBlocking && isFallback) {
|
12135
12144
|
throw new import_build_utils.NowBuildError({
|
@@ -12246,7 +12255,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12246
12255
|
const metaPath = import_path2.default.join(appDir, `${routeFileNoExt}.meta`);
|
12247
12256
|
if (import_fs_extra3.default.existsSync(htmlPath) && import_fs_extra3.default.existsSync(metaPath)) {
|
12248
12257
|
const meta = JSON.parse(await import_fs_extra3.default.readFile(metaPath, "utf8"));
|
12249
|
-
if ("postponed" in meta && typeof meta.postponed === "string") {
|
12258
|
+
if (typeof meta === "object" && meta !== null && "postponed" in meta && typeof meta.postponed === "string") {
|
12250
12259
|
didPostpone = true;
|
12251
12260
|
postponedPrerender = meta.postponed;
|
12252
12261
|
initialHeaders ??= {};
|
@@ -12547,6 +12556,53 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12547
12556
|
prerenders[normalizePathData(outputPathData)] = prerender;
|
12548
12557
|
}
|
12549
12558
|
}
|
12559
|
+
const prefetchSegmentSuffix = routesManifest?.rsc?.prefetchSegmentSuffix;
|
12560
|
+
const prefetchSegmentDirSuffix = routesManifest?.rsc?.prefetchSegmentDirSuffix;
|
12561
|
+
if (isAppClientSegmentCacheEnabled && prefetchSegmentSuffix && prefetchSegmentDirSuffix && rscDidPostponeHeader && appDir) {
|
12562
|
+
const metaPath = import_path2.default.join(appDir, `${routeFileNoExt}.meta`);
|
12563
|
+
if (import_fs_extra3.default.existsSync(metaPath)) {
|
12564
|
+
const meta = JSON.parse(await import_fs_extra3.default.readFile(metaPath, "utf8"));
|
12565
|
+
if (typeof meta === "object" && meta !== null && "segmentPaths" in meta && typeof meta.segmentPaths === "object" && meta.segmentPaths !== null && Array.isArray(meta.segmentPaths)) {
|
12566
|
+
const segmentsDir = import_path2.default.join(
|
12567
|
+
appDir,
|
12568
|
+
routeFileNoExt + prefetchSegmentDirSuffix
|
12569
|
+
);
|
12570
|
+
for (const segmentPath of meta.segmentPaths) {
|
12571
|
+
const outputSegmentPath = import_path2.default.join(
|
12572
|
+
outputPathPage + prefetchSegmentDirSuffix,
|
12573
|
+
segmentPath
|
12574
|
+
) + prefetchSegmentSuffix;
|
12575
|
+
let fallback = null;
|
12576
|
+
if (!isFallback) {
|
12577
|
+
const fsPath = import_path2.default.join(
|
12578
|
+
segmentsDir,
|
12579
|
+
segmentPath + prefetchSegmentSuffix
|
12580
|
+
);
|
12581
|
+
fallback = new import_build_utils.FileFsRef({ fsPath });
|
12582
|
+
}
|
12583
|
+
prerenders[outputSegmentPath] = new import_build_utils.Prerender({
|
12584
|
+
expiration: initialRevalidate,
|
12585
|
+
lambda,
|
12586
|
+
allowQuery,
|
12587
|
+
fallback,
|
12588
|
+
// Use the same prerender group as the JSON/data prerender.
|
12589
|
+
group: prerenderGroup,
|
12590
|
+
allowHeader,
|
12591
|
+
// These routes are always only static, so they should not
|
12592
|
+
// permit any bypass unless it's for preview
|
12593
|
+
bypassToken: prerenderManifest.bypassToken,
|
12594
|
+
experimentalBypassFor: void 0,
|
12595
|
+
initialHeaders: {
|
12596
|
+
...initialHeaders,
|
12597
|
+
vary: rscVaryHeader,
|
12598
|
+
"content-type": rscContentTypeHeader,
|
12599
|
+
[rscDidPostponeHeader]: "2"
|
12600
|
+
}
|
12601
|
+
});
|
12602
|
+
}
|
12603
|
+
}
|
12604
|
+
}
|
12605
|
+
}
|
12550
12606
|
if (outputPathData?.endsWith(".json") && appDir) {
|
12551
12607
|
const dummyOutput = new import_build_utils.FileBlob({
|
12552
12608
|
data: "{}",
|
@@ -13646,7 +13702,8 @@ async function serverBuild({
|
|
13646
13702
|
requiredServerFilesManifest,
|
13647
13703
|
variantsManifest,
|
13648
13704
|
experimentalPPRRoutes,
|
13649
|
-
isAppPPREnabled
|
13705
|
+
isAppPPREnabled,
|
13706
|
+
isAppClientSegmentCacheEnabled
|
13650
13707
|
}) {
|
13651
13708
|
if (isAppPPREnabled) {
|
13652
13709
|
(0, import_build_utils2.debug)(
|
@@ -13699,10 +13756,17 @@ async function serverBuild({
|
|
13699
13756
|
continue;
|
13700
13757
|
const { protocol, pathname, query } = import_url2.default.parse(rewrite.dest);
|
13701
13758
|
if (isAfterFilesRewrite) {
|
13702
|
-
const
|
13759
|
+
const parts = ["\\.rsc"];
|
13760
|
+
if (isAppPPREnabled) {
|
13761
|
+
parts.push("\\.prefetch\\.rsc");
|
13762
|
+
}
|
13763
|
+
if (isAppClientSegmentCacheEnabled) {
|
13764
|
+
parts.push("\\.segments/.+\\.segment\\.rsc");
|
13765
|
+
}
|
13766
|
+
const rscSuffix = parts.join("|");
|
13703
13767
|
rewrite.src = rewrite.src.replace(
|
13704
13768
|
/\/?\(\?:\/\)\?/,
|
13705
|
-
`(?<rscsuff>${rscSuffix})
|
13769
|
+
`(?:/)?(?<rscsuff>${rscSuffix})?`
|
13706
13770
|
);
|
13707
13771
|
let destQueryIndex = rewrite.dest.indexOf("?");
|
13708
13772
|
if (destQueryIndex === -1) {
|
@@ -14597,7 +14661,8 @@ ${JSON.stringify(
|
|
14597
14661
|
hasPages404: routesManifest.pages404,
|
14598
14662
|
isCorrectNotFoundRoutes,
|
14599
14663
|
isEmptyAllowQueryForPrendered,
|
14600
|
-
isAppPPREnabled
|
14664
|
+
isAppPPREnabled,
|
14665
|
+
isAppClientSegmentCacheEnabled
|
14601
14666
|
});
|
14602
14667
|
await Promise.all(
|
14603
14668
|
Object.keys(prerenderManifest.staticRoutes).map(
|
@@ -14662,7 +14727,8 @@ ${JSON.stringify(
|
|
14662
14727
|
bypassToken: prerenderManifest.bypassToken || "",
|
14663
14728
|
isServerMode: true,
|
14664
14729
|
dynamicMiddlewareRouteMap: middleware.dynamicRouteMap,
|
14665
|
-
isAppPPREnabled
|
14730
|
+
isAppPPREnabled,
|
14731
|
+
isAppClientSegmentCacheEnabled
|
14666
14732
|
}).then(
|
14667
14733
|
(arr) => localizeDynamicRoutes(
|
14668
14734
|
arr,
|
@@ -14822,6 +14888,9 @@ ${JSON.stringify(
|
|
14822
14888
|
}
|
14823
14889
|
}
|
14824
14890
|
}
|
14891
|
+
const prefetchSegmentHeader = routesManifest?.rsc?.prefetchSegmentHeader;
|
14892
|
+
const prefetchSegmentDirSuffix = routesManifest?.rsc?.prefetchSegmentDirSuffix;
|
14893
|
+
const prefetchSegmentSuffix = routesManifest?.rsc?.prefetchSegmentSuffix;
|
14825
14894
|
const rscPrefetchHeader = routesManifest.rsc?.prefetchHeader?.toLowerCase();
|
14826
14895
|
const rscVaryHeader = routesManifest?.rsc?.varyHeader || "RSC, Next-Router-State-Tree, Next-Router-Prefetch";
|
14827
14896
|
const appNotFoundPath = import_path4.default.posix.join(".", entryDirectory, "_not-found");
|
@@ -15055,9 +15124,65 @@ ${JSON.stringify(
|
|
15055
15124
|
// to prevent a local/deploy mismatch
|
15056
15125
|
...!isCorrectMiddlewareOrder ? middleware.staticRoutes : [],
|
15057
15126
|
...appDir ? [
|
15127
|
+
...isAppClientSegmentCacheEnabled && rscPrefetchHeader && prefetchSegmentHeader && prefetchSegmentDirSuffix && prefetchSegmentSuffix ? [
|
15128
|
+
{
|
15129
|
+
src: import_path4.default.posix.join("/", entryDirectory, "/(?<path>.+)$"),
|
15130
|
+
dest: import_path4.default.posix.join(
|
15131
|
+
"/",
|
15132
|
+
entryDirectory,
|
15133
|
+
`/$path${prefetchSegmentDirSuffix}/$segmentPath${prefetchSegmentSuffix}`
|
15134
|
+
),
|
15135
|
+
has: [
|
15136
|
+
{
|
15137
|
+
type: "header",
|
15138
|
+
key: rscHeader,
|
15139
|
+
value: "1"
|
15140
|
+
},
|
15141
|
+
{
|
15142
|
+
type: "header",
|
15143
|
+
key: rscPrefetchHeader,
|
15144
|
+
value: "1"
|
15145
|
+
},
|
15146
|
+
{
|
15147
|
+
type: "header",
|
15148
|
+
key: prefetchSegmentHeader,
|
15149
|
+
value: "/(?<segmentPath>.+)"
|
15150
|
+
}
|
15151
|
+
],
|
15152
|
+
continue: true,
|
15153
|
+
override: true
|
15154
|
+
},
|
15155
|
+
{
|
15156
|
+
src: import_path4.default.posix.join("^/", entryDirectory, "$"),
|
15157
|
+
dest: import_path4.default.posix.join(
|
15158
|
+
"/",
|
15159
|
+
entryDirectory,
|
15160
|
+
`/index${prefetchSegmentDirSuffix}/$segmentPath${prefetchSegmentSuffix}`
|
15161
|
+
),
|
15162
|
+
has: [
|
15163
|
+
{
|
15164
|
+
type: "header",
|
15165
|
+
key: rscHeader,
|
15166
|
+
value: "1"
|
15167
|
+
},
|
15168
|
+
{
|
15169
|
+
type: "header",
|
15170
|
+
key: rscPrefetchHeader,
|
15171
|
+
value: "1"
|
15172
|
+
},
|
15173
|
+
{
|
15174
|
+
type: "header",
|
15175
|
+
key: prefetchSegmentHeader,
|
15176
|
+
value: "/(?<segmentPath>.+)"
|
15177
|
+
}
|
15178
|
+
],
|
15179
|
+
continue: true,
|
15180
|
+
override: true
|
15181
|
+
}
|
15182
|
+
] : [],
|
15058
15183
|
...rscPrefetchHeader && isAppPPREnabled ? [
|
15059
15184
|
{
|
15060
|
-
src: `^${import_path4.default.posix.join("/", entryDirectory, "/")}
|
15185
|
+
src: `^${import_path4.default.posix.join("/", entryDirectory, "/")}$`,
|
15061
15186
|
has: [
|
15062
15187
|
{
|
15063
15188
|
type: "header",
|
@@ -15369,6 +15494,23 @@ ${JSON.stringify(
|
|
15369
15494
|
dest: "__next_data_catchall"
|
15370
15495
|
}
|
15371
15496
|
] : [],
|
15497
|
+
// If it didn't match any of the static routes or dynamic ones, then we
|
15498
|
+
// should fallback to the regular RSC request.
|
15499
|
+
...isAppClientSegmentCacheEnabled && rscPrefetchHeader && prefetchSegmentHeader && prefetchSegmentDirSuffix && prefetchSegmentSuffix ? [
|
15500
|
+
{
|
15501
|
+
src: import_path4.default.posix.join(
|
15502
|
+
"/",
|
15503
|
+
entryDirectory,
|
15504
|
+
`/(?<path>.+)${(0, import_escape_string_regexp2.default)(prefetchSegmentDirSuffix)}/.+${(0, import_escape_string_regexp2.default)(prefetchSegmentSuffix)}$`
|
15505
|
+
),
|
15506
|
+
dest: import_path4.default.posix.join(
|
15507
|
+
"/",
|
15508
|
+
entryDirectory,
|
15509
|
+
isAppPPREnabled ? "/$path.prefetch.rsc" : "/$path.rsc"
|
15510
|
+
),
|
15511
|
+
check: true
|
15512
|
+
}
|
15513
|
+
] : [],
|
15372
15514
|
// routes to call after a file has been matched
|
15373
15515
|
{ handle: "hit" },
|
15374
15516
|
// Before we handle static files we need to set proper caching headers
|
@@ -16419,6 +16561,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
16419
16561
|
experimentalPPRRoutes.add(route);
|
16420
16562
|
}
|
16421
16563
|
const isAppPPREnabled = requiredServerFilesManifest ? requiredServerFilesManifest.config.experimental?.ppr === true || requiredServerFilesManifest.config.experimental?.ppr === "incremental" : false;
|
16564
|
+
const isAppClientSegmentCacheEnabled = requiredServerFilesManifest ? requiredServerFilesManifest.config.experimental?.clientSegmentCache === true : false;
|
16422
16565
|
if (requiredServerFilesManifest) {
|
16423
16566
|
if (!routesManifest) {
|
16424
16567
|
throw new Error(
|
@@ -16467,7 +16610,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
16467
16610
|
hasIsr500Page,
|
16468
16611
|
variantsManifest,
|
16469
16612
|
experimentalPPRRoutes,
|
16470
|
-
isAppPPREnabled
|
16613
|
+
isAppPPREnabled,
|
16614
|
+
isAppClientSegmentCacheEnabled
|
16471
16615
|
});
|
16472
16616
|
}
|
16473
16617
|
const pageKeys = Object.keys(pages);
|
@@ -16863,7 +17007,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
16863
17007
|
canUsePreviewMode,
|
16864
17008
|
bypassToken: prerenderManifest.bypassToken || "",
|
16865
17009
|
isServerMode,
|
16866
|
-
isAppPPREnabled: false
|
17010
|
+
isAppPPREnabled: false,
|
17011
|
+
isAppClientSegmentCacheEnabled: false
|
16867
17012
|
}).then(
|
16868
17013
|
(arr) => localizeDynamicRoutes(
|
16869
17014
|
arr,
|
@@ -16889,7 +17034,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
16889
17034
|
canUsePreviewMode,
|
16890
17035
|
bypassToken: prerenderManifest.bypassToken || "",
|
16891
17036
|
isServerMode,
|
16892
|
-
isAppPPREnabled: false
|
17037
|
+
isAppPPREnabled: false,
|
17038
|
+
isAppClientSegmentCacheEnabled: false
|
16893
17039
|
}).then(
|
16894
17040
|
(arr) => arr.map((route) => {
|
16895
17041
|
route.src = route.src.replace("^", `^${dynamicPrefix}`);
|
@@ -17068,7 +17214,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
17068
17214
|
appPathRoutesManifest,
|
17069
17215
|
isSharedLambdas,
|
17070
17216
|
canUsePreviewMode,
|
17071
|
-
isAppPPREnabled: false
|
17217
|
+
isAppPPREnabled: false,
|
17218
|
+
isAppClientSegmentCacheEnabled: false
|
17072
17219
|
});
|
17073
17220
|
await Promise.all(
|
17074
17221
|
Object.keys(prerenderManifest.staticRoutes).map(
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.5.
|
3
|
+
"version": "4.5.2",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
"@types/semver": "6.0.0",
|
31
31
|
"@types/text-table": "0.2.1",
|
32
32
|
"@types/webpack-sources": "3.2.0",
|
33
|
-
"@vercel/build-utils": "9.2.
|
34
|
-
"@vercel/routing-utils": "5.0.
|
33
|
+
"@vercel/build-utils": "9.2.1",
|
34
|
+
"@vercel/routing-utils": "5.0.4",
|
35
35
|
"async-sema": "3.0.1",
|
36
36
|
"buffer-crc32": "0.2.13",
|
37
37
|
"bytes": "3.1.2",
|