mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 12:57:47 +00:00
Update experimental bundle flag (#11187)
Makes bailing from grouping logic more explicit
This commit is contained in:
5
.changeset/kind-pears-attend.md
Normal file
5
.changeset/kind-pears-attend.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@vercel/next": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update experimental bundle flag
|
||||||
@@ -1570,9 +1570,10 @@ export async function getPageLambdaGroups({
|
|||||||
opts = { ...vercelConfigOpts, ...opts };
|
opts = { ...vercelConfigOpts, ...opts };
|
||||||
}
|
}
|
||||||
|
|
||||||
let matchingGroup = groups.find(group => {
|
let matchingGroup = experimentalAllowBundling
|
||||||
|
? undefined
|
||||||
|
: groups.find(group => {
|
||||||
const matches =
|
const matches =
|
||||||
!experimentalAllowBundling &&
|
|
||||||
group.maxDuration === opts.maxDuration &&
|
group.maxDuration === opts.maxDuration &&
|
||||||
group.memory === opts.memory &&
|
group.memory === opts.memory &&
|
||||||
group.isPrerenders === isPrerenderRoute &&
|
group.isPrerenders === isPrerenderRoute &&
|
||||||
@@ -1580,7 +1581,8 @@ export async function getPageLambdaGroups({
|
|||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
let newTracedFilesSize = group.pseudoLayerBytes;
|
let newTracedFilesSize = group.pseudoLayerBytes;
|
||||||
let newTracedFilesUncompressedSize = group.pseudoLayerUncompressedBytes;
|
let newTracedFilesUncompressedSize =
|
||||||
|
group.pseudoLayerUncompressedBytes;
|
||||||
|
|
||||||
for (const newPage of newPages) {
|
for (const newPage of newPages) {
|
||||||
Object.keys(pageTraces[newPage] || {}).map(file => {
|
Object.keys(pageTraces[newPage] || {}).map(file => {
|
||||||
@@ -1591,7 +1593,8 @@ export async function getPageLambdaGroups({
|
|||||||
newTracedFilesUncompressedSize += item.uncompressedSize || 0;
|
newTracedFilesUncompressedSize += item.uncompressedSize || 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
newTracedFilesSize += compressedPages[newPage].compBuffer.byteLength;
|
newTracedFilesSize +=
|
||||||
|
compressedPages[newPage].compBuffer.byteLength;
|
||||||
newTracedFilesUncompressedSize +=
|
newTracedFilesUncompressedSize +=
|
||||||
compressedPages[newPage].uncompressedSize;
|
compressedPages[newPage].uncompressedSize;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user