Skip to content

Commit

Permalink
make public Ids for manual shared Bundles their names and dont includ…
Browse files Browse the repository at this point in the history
…e source bundles for shared bundles unique keys
  • Loading branch information
AGawrys committed Oct 10, 2023
1 parent ce58970 commit a972a3c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/bundlers/default/src/DefaultBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,14 @@ function decorateLegacyGraph(
idealBundle.sourceBundles.size > 0 &&
!idealBundle.mainEntryAsset
) {
let uniqueKey =
idealBundle.manualSharedBundle != null
? idealBundle.manualSharedBundle
: [...idealBundle.assets].map(asset => asset.id).join(',');

bundle = nullthrows(
bundleGraph.createBundle({
uniqueKey:
[...idealBundle.assets].map(asset => asset.id).join(',') +
[...idealBundle.sourceBundles].join(','),
uniqueKey,
needsStableName: idealBundle.needsStableName,
bundleBehavior: idealBundle.bundleBehavior,
type: idealBundle.type,
Expand Down Expand Up @@ -1420,7 +1423,7 @@ function createIdealGraph(
target: firstSourceBundle.target,
type: firstSourceBundle.type,
env: firstSourceBundle.env,
manualSharedBundle: manualSharedObject.name,
manualSharedBundle: manualSharedObject.name + i,
});
bundle.sourceBundles = manualBundle.sourceBundles;
bundle.internalizedAssets = manualBundle.internalizedAssets;
Expand Down

0 comments on commit a972a3c

Please sign in to comment.