mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[next] Add flag for experimental grouping (#11177)
Just adds a flag for experimenting
This commit is contained in:
@@ -804,6 +804,7 @@ export interface CreateLambdaFromPseudoLayersOptions
|
||||
layers: PseudoLayer[];
|
||||
isStreaming?: boolean;
|
||||
nextVersion?: string;
|
||||
experimentalAllowBundling?: boolean;
|
||||
}
|
||||
|
||||
// measured with 1, 2, 5, 10, and `os.cpus().length || 5`
|
||||
@@ -815,6 +816,7 @@ export async function createLambdaFromPseudoLayers({
|
||||
layers,
|
||||
isStreaming,
|
||||
nextVersion,
|
||||
experimentalAllowBundling,
|
||||
...lambdaOptions
|
||||
}: CreateLambdaFromPseudoLayersOptions) {
|
||||
await createLambdaSema.acquire();
|
||||
@@ -862,6 +864,7 @@ export async function createLambdaFromPseudoLayers({
|
||||
slug: 'nextjs',
|
||||
version: nextVersion,
|
||||
},
|
||||
experimentalAllowBundling,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1502,6 +1505,7 @@ export async function getPageLambdaGroups({
|
||||
internalPages,
|
||||
pageExtensions,
|
||||
inversedAppPathManifest,
|
||||
experimentalAllowBundling,
|
||||
}: {
|
||||
entryPath: string;
|
||||
config: Config;
|
||||
@@ -1524,6 +1528,7 @@ export async function getPageLambdaGroups({
|
||||
internalPages: string[];
|
||||
pageExtensions?: string[];
|
||||
inversedAppPathManifest?: Record<string, string>;
|
||||
experimentalAllowBundling?: boolean;
|
||||
}) {
|
||||
const groups: Array<LambdaGroup> = [];
|
||||
|
||||
@@ -1565,6 +1570,7 @@ export async function getPageLambdaGroups({
|
||||
|
||||
let matchingGroup = groups.find(group => {
|
||||
const matches =
|
||||
!experimentalAllowBundling &&
|
||||
group.maxDuration === opts.maxDuration &&
|
||||
group.memory === opts.memory &&
|
||||
group.isPrerenders === isPrerenderRoute &&
|
||||
|
||||
Reference in New Issue
Block a user