From 1eeff20c9c9c084e177858f92dc4a61149a41c0f Mon Sep 17 00:00:00 2001 From: mattcompiles Date: Thu, 6 Apr 2023 13:13:47 +1000 Subject: [PATCH] Fix packaging of syncronous reused bundles --- packages/bundlers/default/src/DefaultBundler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bundlers/default/src/DefaultBundler.js b/packages/bundlers/default/src/DefaultBundler.js index 2ec13645332..7c492a7aa99 100644 --- a/packages/bundlers/default/src/DefaultBundler.js +++ b/packages/bundlers/default/src/DefaultBundler.js @@ -176,7 +176,10 @@ function decorateLegacyGraph( ); bundleGraph.addBundleToBundleGroup(bundle, bundleGroup); - } else if (idealBundle.sourceBundles.size > 0) { + } else if ( + idealBundle.sourceBundles.size > 0 && + !idealBundle.mainEntryAsset + ) { bundle = nullthrows( bundleGraph.createBundle({ uniqueKey: