Skip to content

Commit

Permalink
sort assets before splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
AGawrys committed Oct 5, 2023
1 parent 289510b commit 75fff53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/bundlers/default/src/DefaultBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,13 @@ function createIdealGraph(
bundleGraph.getNode([...manualBundle.sourceBundles][0]),
);
invariant(firstSourceBundle !== 'root');
let firstAsset = [...manualBundle.assets][0];
let assetArr = [...manualBundle.assets];
let firstAsset = assetArr[0];
if (manualAssetToConfig.get(firstAsset)?.split == null) {
continue;
}
assetArr.sort((a, b) => a.id.localeCompare(b.id));
manualBundle.assets = new Set(assetArr);
let manualSharedObject = manualAssetToConfig.get(firstAsset);
invariant(manualSharedObject != null);
let modNum = manualAssetToConfig.get(firstAsset)?.split;
Expand Down

0 comments on commit 75fff53

Please sign in to comment.