From ae3ee145388a40b0752771f5a8a8abc10a172c5e Mon Sep 17 00:00:00 2001 From: thebriando Date: Tue, 8 Mar 2022 20:17:08 -0800 Subject: [PATCH] Remove reachableBundles --- .../experimental/src/ExperimentalBundler.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/bundlers/experimental/src/ExperimentalBundler.js b/packages/bundlers/experimental/src/ExperimentalBundler.js index b4d370affa6..a0b7b2cbc67 100644 --- a/packages/bundlers/experimental/src/ExperimentalBundler.js +++ b/packages/bundlers/experimental/src/ExperimentalBundler.js @@ -265,11 +265,6 @@ function createIdealGraph( Array<[Dependency, Bundle]>, > = new DefaultMap(() => []); - // Connects bundleRoot assets to the assets that must be in the bundle - let reachableBundles: DefaultMap> = new DefaultMap( - () => new Set(), - ); - let bundleGraph: Graph = new Graph(); let stack: Array<[BundleRoot, NodeId]> = []; @@ -403,20 +398,6 @@ function createIdealGraph( ), dependencyPriorityEdges[dependency.priority], ); - - // Walk up the stack until we hit a different asset type - // and mark each bundle as reachable from every parent bundle - for (let i = stack.length - 1; i >= 0; i--) { - let [stackAsset] = stack[i]; - if ( - stackAsset.type !== childAsset.type || - stackAsset.env.context !== childAsset.env.context || - stackAsset.env.isIsolated() - ) { - break; - } - reachableBundles.get(stackAsset).add(childAsset); - } continue; } if (