@vercel/next 4.1.1 → 4.1.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -9971,6 +9971,7 @@ async function createLambdaFromPseudoLayers({
9971
9971
  layers,
9972
9972
  isStreaming,
9973
9973
  nextVersion,
9974
+ experimentalAllowBundling,
9974
9975
  ...lambdaOptions
9975
9976
  }) {
9976
9977
  await createLambdaSema.acquire();
@@ -10007,7 +10008,8 @@ async function createLambdaFromPseudoLayers({
10007
10008
  framework: {
10008
10009
  slug: "nextjs",
10009
10010
  version: nextVersion
10010
- }
10011
+ },
10012
+ experimentalAllowBundling
10011
10013
  });
10012
10014
  }
10013
10015
  async function getExportIntent(entryPath) {
@@ -10365,7 +10367,8 @@ async function getPageLambdaGroups({
10365
10367
  lambdaCompressedByteLimit,
10366
10368
  internalPages,
10367
10369
  pageExtensions,
10368
- inversedAppPathManifest
10370
+ inversedAppPathManifest,
10371
+ experimentalAllowBundling
10369
10372
  }) {
10370
10373
  const groups = [];
10371
10374
  for (const page of pages) {
@@ -10392,7 +10395,7 @@ async function getPageLambdaGroups({
10392
10395
  });
10393
10396
  opts = { ...vercelConfigOpts, ...opts };
10394
10397
  }
10395
- let matchingGroup = groups.find((group) => {
10398
+ let matchingGroup = experimentalAllowBundling ? void 0 : groups.find((group) => {
10396
10399
  const matches = group.maxDuration === opts.maxDuration && group.memory === opts.memory && group.isPrerenders === isPrerenderRoute && group.isExperimentalPPR === isExperimentalPPR;
10397
10400
  if (matches) {
10398
10401
  let newTracedFilesSize = group.pseudoLayerBytes;
@@ -12017,6 +12020,9 @@ async function serverBuild({
12017
12020
  variantsManifest
12018
12021
  }) {
12019
12022
  lambdaPages = Object.assign({}, lambdaPages, lambdaAppPaths);
12023
+ const experimentalAllowBundling = Boolean(
12024
+ process.env.NEXT_EXPERIMENTAL_FUNCTION_BUNDLING
12025
+ );
12020
12026
  const lambdas = {};
12021
12027
  const prerenders = {};
12022
12028
  const lambdaPageKeys = Object.keys(lambdaPages);
@@ -12530,6 +12536,7 @@ async function serverBuild({
12530
12536
  );
12531
12537
  const pageExtensions = requiredServerFilesManifest.config?.pageExtensions;
12532
12538
  const pageLambdaGroups = await getPageLambdaGroups({
12539
+ experimentalAllowBundling,
12533
12540
  entryPath: projectDir,
12534
12541
  config,
12535
12542
  functionsConfigManifest,
@@ -12549,6 +12556,7 @@ async function serverBuild({
12549
12556
  group.isPages = true;
12550
12557
  }
12551
12558
  const appRouterLambdaGroups = await getPageLambdaGroups({
12559
+ experimentalAllowBundling,
12552
12560
  entryPath: projectDir,
12553
12561
  config,
12554
12562
  functionsConfigManifest,
@@ -12566,6 +12574,7 @@ async function serverBuild({
12566
12574
  inversedAppPathManifest
12567
12575
  });
12568
12576
  const appRouteHandlersLambdaGroups = await getPageLambdaGroups({
12577
+ experimentalAllowBundling,
12569
12578
  entryPath: projectDir,
12570
12579
  config,
12571
12580
  functionsConfigManifest,
@@ -12765,7 +12774,8 @@ async function serverBuild({
12765
12774
  runtime: nodeVersion.runtime,
12766
12775
  maxDuration: group.maxDuration,
12767
12776
  isStreaming: group.isStreaming,
12768
- nextVersion
12777
+ nextVersion,
12778
+ experimentalAllowBundling
12769
12779
  };
12770
12780
  const lambda = await createLambdaFromPseudoLayers(options);
12771
12781
  const isPPR = experimental.ppr && group.isAppRouter && !group.isAppRouteHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -13,7 +13,7 @@
13
13
  "dist"
14
14
  ],
15
15
  "dependencies": {
16
- "@vercel/nft": "0.26.3"
16
+ "@vercel/nft": "0.26.4"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/aws-lambda": "8.10.19",
@@ -30,7 +30,7 @@
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": "7.6.0",
33
+ "@vercel/build-utils": "7.7.0",
34
34
  "@vercel/routing-utils": "3.1.0",
35
35
  "async-sema": "3.0.1",
36
36
  "buffer-crc32": "0.2.13",