Update experimental bundle flag (#11187)

Makes bailing from grouping logic more explicit
This commit is contained in:
JJ Kasper
2024-02-21 20:53:16 -08:00
committed by GitHub
parent 440ef3ba98
commit d17abf463a
2 changed files with 39 additions and 31 deletions

View File

@@ -0,0 +1,5 @@
---
"@vercel/next": patch
---
Update experimental bundle flag

View File

@@ -1570,9 +1570,10 @@ export async function getPageLambdaGroups({
opts = { ...vercelConfigOpts, ...opts };
}
let matchingGroup = groups.find(group => {
let matchingGroup = experimentalAllowBundling
? undefined
: groups.find(group => {
const matches =
!experimentalAllowBundling &&
group.maxDuration === opts.maxDuration &&
group.memory === opts.memory &&
group.isPrerenders === isPrerenderRoute &&
@@ -1580,7 +1581,8 @@ export async function getPageLambdaGroups({
if (matches) {
let newTracedFilesSize = group.pseudoLayerBytes;
let newTracedFilesUncompressedSize = group.pseudoLayerUncompressedBytes;
let newTracedFilesUncompressedSize =
group.pseudoLayerUncompressedBytes;
for (const newPage of newPages) {
Object.keys(pageTraces[newPage] || {}).map(file => {
@@ -1591,7 +1593,8 @@ export async function getPageLambdaGroups({
newTracedFilesUncompressedSize += item.uncompressedSize || 0;
}
});
newTracedFilesSize += compressedPages[newPage].compBuffer.byteLength;
newTracedFilesSize +=
compressedPages[newPage].compBuffer.byteLength;
newTracedFilesUncompressedSize +=
compressedPages[newPage].uncompressedSize;
}