@module-federation/runtime-core 0.0.0-next-20250916081540 → 0.0.0-next-20250919235431

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,7 +202,7 @@ function getGlobalFederationConstructor() {
202
202
  function setGlobalFederationConstructor(FederationConstructor, isDebug = sdk.isDebugMode()) {
203
203
  if (isDebug) {
204
204
  CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
205
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.0-next-20250916081540";
205
+ CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.0-next-20250919235431";
206
206
  }
207
207
  }
208
208
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -1191,7 +1191,7 @@ function getRemoteEntryUniqueKey(remoteInfo) {
1191
1191
  return sdk.composeKeyWithSeparator(name, entry);
1192
1192
  }
1193
1193
  async function getRemoteEntry(params) {
1194
- const { origin, remoteEntryExports, remoteInfo, getEntryUrl, _inErrorHandling = false } = params;
1194
+ const { origin, remoteEntryExports, remoteInfo, getEntryUrl } = params;
1195
1195
  const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
1196
1196
  if (remoteEntryExports) {
1197
1197
  return remoteEntryExports;
@@ -1218,41 +1218,6 @@ async function getRemoteEntry(params) {
1218
1218
  remoteInfo,
1219
1219
  loaderHook
1220
1220
  });
1221
- }).catch(async (err)=>{
1222
- const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
1223
- const isScriptLoadError = err instanceof Error && err.message.includes(errorCodes.RUNTIME_008);
1224
- // Only call loadEntryError when not in error handling state to prevent recursion
1225
- if (isScriptLoadError && !_inErrorHandling) {
1226
- try {
1227
- // Create a wrapped getRemoteEntry function with _inErrorHandling flag
1228
- const wrappedGetRemoteEntry = (params)=>{
1229
- return getRemoteEntry(polyfills._extends({}, params, {
1230
- _inErrorHandling: true
1231
- }));
1232
- };
1233
- const retryResult = await origin.loaderHook.lifecycle.loadEntryError.emit({
1234
- getRemoteEntry: wrappedGetRemoteEntry,
1235
- origin,
1236
- remoteInfo: remoteInfo,
1237
- remoteEntryExports,
1238
- globalLoading,
1239
- uniqueKey
1240
- });
1241
- // If retry returns a result (could be remote entry exports object or function)
1242
- if (retryResult) {
1243
- if (typeof retryResult === 'function') {
1244
- return await retryResult();
1245
- } else {
1246
- return retryResult;
1247
- }
1248
- }
1249
- } catch (retryError) {
1250
- // If retry failed, throw retry error to preserve retry details
1251
- throw retryError;
1252
- }
1253
- }
1254
- // If no retry or retry didn't return result, throw original error
1255
- throw err;
1256
1221
  });
1257
1222
  }
1258
1223
  return globalLoading[uniqueKey];
@@ -1474,7 +1439,20 @@ let Module = class Module {
1474
1439
  remoteInfo: this.remoteInfo,
1475
1440
  remoteEntryExports: this.remoteEntryExports
1476
1441
  });
1477
- } catch (err) {}
1442
+ } catch (err) {
1443
+ const uniqueKey = getRemoteEntryUniqueKey(this.remoteInfo);
1444
+ const isScriptLoadError = err instanceof Error && err.message.includes(errorCodes.RUNTIME_008);
1445
+ if (isScriptLoadError) {
1446
+ remoteEntryExports = await this.host.loaderHook.lifecycle.loadEntryError.emit({
1447
+ getRemoteEntry,
1448
+ origin: this.host,
1449
+ remoteInfo: this.remoteInfo,
1450
+ remoteEntryExports: this.remoteEntryExports,
1451
+ globalLoading,
1452
+ uniqueKey
1453
+ });
1454
+ }
1455
+ }
1478
1456
  assert(remoteEntryExports, `remoteEntryExports is undefined \n ${sdk.safeToString(this.remoteInfo)}`);
1479
1457
  this.remoteEntryExports = remoteEntryExports;
1480
1458
  return this.remoteEntryExports;
@@ -3065,7 +3043,7 @@ class ModuleFederation {
3065
3043
  // maybe will change, temporarily for internal use only
3066
3044
  initContainer: new AsyncWaterfallHook('initContainer')
3067
3045
  });
3068
- this.version = "0.0.0-next-20250916081540";
3046
+ this.version = "0.0.0-next-20250919235431";
3069
3047
  this.moduleCache = new Map();
3070
3048
  this.loaderHook = new PluginSystem({
3071
3049
  // FIXME: may not be suitable , not open to the public yet