@vercel/next 4.2.13 → 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.
Files changed (2) hide show
  1. package/dist/index.js +8 -3
  2. 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,
@@ -14464,9 +14462,10 @@ async function serverBuild({
14464
14462
  }
14465
14463
  for (const rewrite of afterFilesRewrites) {
14466
14464
  if (rewrite.src && rewrite.dest) {
14465
+ const rscSuffix = isAppPPREnabled ? `(\\.prefetch)?\\.rsc${hasActionOutputSupport ? "|\\.action" : ""}` : hasActionOutputSupport ? "(\\.action|\\.rsc)" : "\\.rsc";
14467
14466
  rewrite.src = rewrite.src.replace(
14468
14467
  /\/?\(\?:\/\)\?/,
14469
- `(?<rscsuff>${isAppPPREnabled ? "(\\.prefetch)?" : ""}\\.rsc)?(?:/)?`
14468
+ `(?<rscsuff>${rscSuffix})?(?:/)?`
14470
14469
  );
14471
14470
  let destQueryIndex = rewrite.dest.indexOf("?");
14472
14471
  if (destQueryIndex === -1) {
@@ -14980,6 +14979,9 @@ async function serverBuild({
14980
14979
  });
14981
14980
  const appRouterStreamingActionLambdaGroups = [];
14982
14981
  for (const group of appRouterLambdaGroups) {
14982
+ if (!group.isPrerenders || group.isExperimentalPPR) {
14983
+ group.isStreaming = true;
14984
+ }
14983
14985
  group.isAppRouter = true;
14984
14986
  if (hasActionOutputSupport) {
14985
14987
  appRouterStreamingActionLambdaGroups.push({
@@ -14990,6 +14992,9 @@ async function serverBuild({
14990
14992
  }
14991
14993
  }
14992
14994
  for (const group of appRouteHandlersLambdaGroups) {
14995
+ if (!group.isPrerenders) {
14996
+ group.isStreaming = true;
14997
+ }
14993
14998
  group.isAppRouter = true;
14994
14999
  group.isAppRouteHandler = true;
14995
15000
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.2.13",
3
+ "version": "4.2.14",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",