@vercel/next 4.1.1 → 4.1.3
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 -8
- 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);
|
@@ -12072,10 +12078,7 @@ async function serverBuild({
|
|
12072
12078
|
nextVersion,
|
12073
12079
|
CORRECT_MIDDLEWARE_ORDER_VERSION
|
12074
12080
|
);
|
12075
|
-
const isCorrectManifests = import_semver3.default.gte(
|
12076
|
-
nextVersion,
|
12077
|
-
CORRECTED_MANIFESTS_VERSION
|
12078
|
-
);
|
12081
|
+
const isCorrectManifests = !experimentalAllowBundling && import_semver3.default.gte(nextVersion, CORRECTED_MANIFESTS_VERSION);
|
12079
12082
|
let hasStatic500 = !!staticPages[import_path4.default.posix.join(entryDirectory, "500")];
|
12080
12083
|
if (lambdaPageKeys.length === 0) {
|
12081
12084
|
throw new import_build_utils2.NowBuildError({
|
@@ -12530,6 +12533,7 @@ async function serverBuild({
|
|
12530
12533
|
);
|
12531
12534
|
const pageExtensions = requiredServerFilesManifest.config?.pageExtensions;
|
12532
12535
|
const pageLambdaGroups = await getPageLambdaGroups({
|
12536
|
+
experimentalAllowBundling,
|
12533
12537
|
entryPath: projectDir,
|
12534
12538
|
config,
|
12535
12539
|
functionsConfigManifest,
|
@@ -12549,6 +12553,7 @@ async function serverBuild({
|
|
12549
12553
|
group.isPages = true;
|
12550
12554
|
}
|
12551
12555
|
const appRouterLambdaGroups = await getPageLambdaGroups({
|
12556
|
+
experimentalAllowBundling,
|
12552
12557
|
entryPath: projectDir,
|
12553
12558
|
config,
|
12554
12559
|
functionsConfigManifest,
|
@@ -12566,6 +12571,7 @@ async function serverBuild({
|
|
12566
12571
|
inversedAppPathManifest
|
12567
12572
|
});
|
12568
12573
|
const appRouteHandlersLambdaGroups = await getPageLambdaGroups({
|
12574
|
+
experimentalAllowBundling,
|
12569
12575
|
entryPath: projectDir,
|
12570
12576
|
config,
|
12571
12577
|
functionsConfigManifest,
|
@@ -12765,7 +12771,8 @@ async function serverBuild({
|
|
12765
12771
|
runtime: nodeVersion.runtime,
|
12766
12772
|
maxDuration: group.maxDuration,
|
12767
12773
|
isStreaming: group.isStreaming,
|
12768
|
-
nextVersion
|
12774
|
+
nextVersion,
|
12775
|
+
experimentalAllowBundling
|
12769
12776
|
};
|
12770
12777
|
const lambda = await createLambdaFromPseudoLayers(options);
|
12771
12778
|
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.
|
3
|
+
"version": "4.1.3",
|
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.
|
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.
|
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",
|