@vercel/next 4.2.12 → 4.2.14
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 +15 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -12718,7 +12718,6 @@ async function getPageLambdaGroups({
|
|
12718
12718
|
const routeName = normalizePage(page.replace(/\.js$/, ""));
|
12719
12719
|
const isPrerenderRoute = prerenderRoutes.has(routeName);
|
12720
12720
|
const isExperimentalPPR = experimentalPPRRoutes?.has(routeName) ?? false;
|
12721
|
-
const isStreaming = !isPrerenderRoute || isExperimentalPPR;
|
12722
12721
|
let opts = {};
|
12723
12722
|
if (functionsConfigManifest && functionsConfigManifest.functions[routeName]) {
|
12724
12723
|
opts = functionsConfigManifest.functions[routeName];
|
@@ -12765,7 +12764,6 @@ async function getPageLambdaGroups({
|
|
12765
12764
|
...opts,
|
12766
12765
|
isPrerenders: isPrerenderRoute,
|
12767
12766
|
isExperimentalPPR,
|
12768
|
-
isStreaming,
|
12769
12767
|
isApiLambda: !!isApiPage(page),
|
12770
12768
|
pseudoLayerBytes: initialPseudoLayer.pseudoLayerBytes,
|
12771
12769
|
pseudoLayerUncompressedBytes: initialPseudoLayerUncompressed,
|
@@ -12972,7 +12970,8 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12972
12970
|
pageLambdaMap,
|
12973
12971
|
routesManifest,
|
12974
12972
|
isCorrectNotFoundRoutes,
|
12975
|
-
isEmptyAllowQueryForPrendered
|
12973
|
+
isEmptyAllowQueryForPrendered,
|
12974
|
+
isAppPPREnabled
|
12976
12975
|
} = prerenderRouteArgs;
|
12977
12976
|
if (isBlocking && isFallback) {
|
12978
12977
|
throw new import_build_utils.NowBuildError({
|
@@ -13160,7 +13159,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
13160
13159
|
}
|
13161
13160
|
let outputPathPrefetchData = null;
|
13162
13161
|
if (prefetchDataRoute) {
|
13163
|
-
if (!
|
13162
|
+
if (!isAppPPREnabled) {
|
13164
13163
|
throw new Error(
|
13165
13164
|
"Invariant: prefetchDataRoute can't be set without PPR"
|
13166
13165
|
);
|
@@ -14463,9 +14462,10 @@ async function serverBuild({
|
|
14463
14462
|
}
|
14464
14463
|
for (const rewrite of afterFilesRewrites) {
|
14465
14464
|
if (rewrite.src && rewrite.dest) {
|
14465
|
+
const rscSuffix = isAppPPREnabled ? `(\\.prefetch)?\\.rsc${hasActionOutputSupport ? "|\\.action" : ""}` : hasActionOutputSupport ? "(\\.action|\\.rsc)" : "\\.rsc";
|
14466
14466
|
rewrite.src = rewrite.src.replace(
|
14467
14467
|
/\/?\(\?:\/\)\?/,
|
14468
|
-
`(?<rscsuff>${
|
14468
|
+
`(?<rscsuff>${rscSuffix})?(?:/)?`
|
14469
14469
|
);
|
14470
14470
|
let destQueryIndex = rewrite.dest.indexOf("?");
|
14471
14471
|
if (destQueryIndex === -1) {
|
@@ -14979,6 +14979,9 @@ async function serverBuild({
|
|
14979
14979
|
});
|
14980
14980
|
const appRouterStreamingActionLambdaGroups = [];
|
14981
14981
|
for (const group of appRouterLambdaGroups) {
|
14982
|
+
if (!group.isPrerenders || group.isExperimentalPPR) {
|
14983
|
+
group.isStreaming = true;
|
14984
|
+
}
|
14982
14985
|
group.isAppRouter = true;
|
14983
14986
|
if (hasActionOutputSupport) {
|
14984
14987
|
appRouterStreamingActionLambdaGroups.push({
|
@@ -14989,6 +14992,9 @@ async function serverBuild({
|
|
14989
14992
|
}
|
14990
14993
|
}
|
14991
14994
|
for (const group of appRouteHandlersLambdaGroups) {
|
14995
|
+
if (!group.isPrerenders) {
|
14996
|
+
group.isStreaming = true;
|
14997
|
+
}
|
14992
14998
|
group.isAppRouter = true;
|
14993
14999
|
group.isAppRouteHandler = true;
|
14994
15000
|
}
|
@@ -15286,7 +15292,8 @@ async function serverBuild({
|
|
15286
15292
|
localePrefixed404,
|
15287
15293
|
hasPages404: routesManifest.pages404,
|
15288
15294
|
isCorrectNotFoundRoutes,
|
15289
|
-
isEmptyAllowQueryForPrendered
|
15295
|
+
isEmptyAllowQueryForPrendered,
|
15296
|
+
isAppPPREnabled
|
15290
15297
|
});
|
15291
15298
|
await Promise.all(
|
15292
15299
|
Object.keys(prerenderManifest.staticRoutes).map(
|
@@ -17693,7 +17700,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
17693
17700
|
prerenderManifest,
|
17694
17701
|
appPathRoutesManifest,
|
17695
17702
|
isSharedLambdas,
|
17696
|
-
canUsePreviewMode
|
17703
|
+
canUsePreviewMode,
|
17704
|
+
isAppPPREnabled: false
|
17697
17705
|
});
|
17698
17706
|
await Promise.all(
|
17699
17707
|
Object.keys(prerenderManifest.staticRoutes).map(
|