Skip to content

Commit

Permalink
match limit to num shared bundles in group
Browse files Browse the repository at this point in the history
  • Loading branch information
gorakong committed Jul 5, 2022
1 parent fdbe58e commit a2e15fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bundlers/experimental/src/ExperimentalBundler.js
Expand Up @@ -1029,7 +1029,7 @@ function createIdealGraph(
[...sharedToSourceBundleIds.keys()].includes(id),
);

if (bundleIdsInGroup.length > config.maxParallelRequests) {
if (sharedBundleIdsInGroup.length > config.maxParallelRequests) {
// Sort the bundles so the smallest ones are removed first.
let sharedBundlesInGroup = sharedBundleIdsInGroup
.map(id => ({
Expand All @@ -1046,7 +1046,7 @@ function createIdealGraph(
// Remove bundles until the bundle group is within the parallel request limit.
for (
let i = 0;
i < bundleIdsInGroup.length - config.maxParallelRequests;
i < sharedBundlesInGroup.length - config.maxParallelRequests;
i++
) {
let bundleToRemove = sharedBundlesInGroup[i].bundle;
Expand Down

0 comments on commit a2e15fc

Please sign in to comment.