@module-federation/bridge-react 0.19.1 → 0.20.0

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/__tests__/bridge.spec.tsx +37 -14
  3. package/dist/{bridge-base-Ds850AOx.js → bridge-base-Bn6DO0Fi.js} +1 -1
  4. package/dist/{bridge-base-BwHtOqw_.mjs → bridge-base-DxcR1fja.mjs} +1 -1
  5. package/dist/data-fetch-server-middleware.cjs.js +2 -2
  6. package/dist/data-fetch-server-middleware.es.js +2 -2
  7. package/dist/data-fetch-utils.cjs.js +2 -2
  8. package/dist/data-fetch-utils.es.js +4 -4
  9. package/dist/{index-rAO0Wr0M.mjs → index-Dm-M9ouh.mjs} +1 -1
  10. package/dist/{index-eN2xRRXs.js → index-DqCpgmgH.js} +1 -1
  11. package/dist/index.cjs.js +5 -5
  12. package/dist/index.es.js +5 -5
  13. package/dist/{index.esm-Ju4RY-yW.js → index.esm-CzoIcLts.js} +76 -46
  14. package/dist/{index.esm-CtI0uQUR.mjs → index.esm-JLwyxgUK.mjs} +81 -51
  15. package/dist/{lazy-load-component-plugin-Dmzr-hGo.mjs → lazy-load-component-plugin-Bcm5-gd8.mjs} +2 -2
  16. package/dist/{lazy-load-component-plugin-vtpWwn-P.js → lazy-load-component-plugin-C-qNUGjT.js} +2 -2
  17. package/dist/lazy-load-component-plugin.cjs.js +2 -2
  18. package/dist/lazy-load-component-plugin.es.js +2 -2
  19. package/dist/lazy-utils.cjs.js +2 -2
  20. package/dist/lazy-utils.es.js +2 -2
  21. package/dist/{prefetch-DtZwviM-.mjs → prefetch-COMVhC39.mjs} +63 -139
  22. package/dist/{prefetch-HjsWsmMr.js → prefetch-NDhOcbO7.js} +63 -139
  23. package/dist/router-v5.cjs.js +1 -1
  24. package/dist/router-v5.es.js +1 -1
  25. package/dist/router-v6.cjs.js +1 -1
  26. package/dist/router-v6.es.js +1 -1
  27. package/dist/router.cjs.js +1 -1
  28. package/dist/router.es.js +1 -1
  29. package/dist/{utils-vIpCrZmn.js → utils-0HFFqmd4.js} +1 -1
  30. package/dist/{utils-VSOJTX_o.mjs → utils-BTpxHmva.mjs} +1 -1
  31. package/dist/v18.cjs.js +1 -1
  32. package/dist/v18.es.js +1 -1
  33. package/dist/v19.cjs.js +1 -1
  34. package/dist/v19.es.js +1 -1
  35. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- const lazyUtils = require("./utils-vIpCrZmn.js");
3
- const index_esm = require("./index.esm-Ju4RY-yW.js");
2
+ const lazyUtils = require("./utils-0HFFqmd4.js");
3
+ const index_esm = require("./index.esm-CzoIcLts.js");
4
4
  const dataFetchFunction = async function(options) {
5
5
  var _a, _b;
6
6
  const [id, data, downgrade] = options;
@@ -76,38 +76,6 @@ function injectDataFetch() {
76
76
  globalThis[lazyUtils.FS_HREF] = window.location.href;
77
77
  dataFetch.push = dataFetchFunction;
78
78
  }
79
- function _extends$2() {
80
- _extends$2 = Object.assign || function assign(target) {
81
- for (var i = 1; i < arguments.length; i++) {
82
- var source = arguments[i];
83
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
84
- }
85
- return target;
86
- };
87
- return _extends$2.apply(this, arguments);
88
- }
89
- function _extends$1() {
90
- _extends$1 = Object.assign || function assign(target) {
91
- for (var i = 1; i < arguments.length; i++) {
92
- var source = arguments[i];
93
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
94
- }
95
- return target;
96
- };
97
- return _extends$1.apply(this, arguments);
98
- }
99
- function _object_without_properties_loose(source, excluded) {
100
- if (source == null) return {};
101
- var target = {};
102
- var sourceKeys = Object.keys(source);
103
- var key, i;
104
- for (i = 0; i < sourceKeys.length; i++) {
105
- key = sourceKeys[i];
106
- if (excluded.indexOf(key) >= 0) continue;
107
- target[key] = source[key];
108
- }
109
- return target;
110
- }
111
79
  const RUNTIME_001 = "RUNTIME-001";
112
80
  const RUNTIME_002 = "RUNTIME-002";
113
81
  const RUNTIME_003 = "RUNTIME-003";
@@ -117,33 +85,16 @@ const RUNTIME_006 = "RUNTIME-006";
117
85
  const RUNTIME_007 = "RUNTIME-007";
118
86
  const RUNTIME_008 = "RUNTIME-008";
119
87
  const RUNTIME_009 = "RUNTIME-009";
120
- const TYPE_001 = "TYPE-001";
121
- const BUILD_001 = "BUILD-001";
122
- const BUILD_002 = "BUILD-002";
123
88
  const getDocsUrl = (errorCode) => {
124
89
  const type = errorCode.split("-")[0].toLowerCase();
125
90
  return `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${type}/${errorCode}`;
126
91
  };
127
92
  const getShortErrorMsg = (errorCode, errorDescMap, args, originalErrorMsg) => {
128
- const msg = [
129
- `${[
130
- errorDescMap[errorCode]
131
- ]} #${errorCode}`
132
- ];
93
+ const msg = [`${[errorDescMap[errorCode]]} #${errorCode}`];
133
94
  args && msg.push(`args: ${JSON.stringify(args)}`);
134
95
  msg.push(getDocsUrl(errorCode));
135
96
  return msg.join("\n");
136
97
  };
137
- function _extends() {
138
- _extends = Object.assign || function assign(target) {
139
- for (var i = 1; i < arguments.length; i++) {
140
- var source = arguments[i];
141
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
142
- }
143
- return target;
144
- };
145
- return _extends.apply(this, arguments);
146
- }
147
98
  const runtimeDescMap = {
148
99
  [RUNTIME_001]: "Failed to get remoteEntry exports.",
149
100
  [RUNTIME_002]: 'The remote entry interface does not contain "init"',
@@ -155,14 +106,9 @@ const runtimeDescMap = {
155
106
  [RUNTIME_008]: "Failed to load script resources.",
156
107
  [RUNTIME_009]: "Please call createInstance first."
157
108
  };
158
- const typeDescMap = {
159
- [TYPE_001]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."
160
- };
161
- const buildDescMap = {
162
- [BUILD_001]: "Failed to find expose module.",
163
- [BUILD_002]: "PublicPath is required in prod mode."
164
- };
165
- _extends({}, runtimeDescMap, typeDescMap, buildDescMap);
109
+ ({
110
+ ...runtimeDescMap
111
+ });
166
112
  const LOG_CATEGORY = "[ Federation Runtime ]";
167
113
  const logger = index_esm.createLogger(LOG_CATEGORY);
168
114
  function assert(condition, msg) {
@@ -202,7 +148,7 @@ const CurrentGlobal = typeof globalThis === "object" ? globalThis : window;
202
148
  const nativeGlobal = (() => {
203
149
  try {
204
150
  return document.defaultView;
205
- } catch (e) {
151
+ } catch {
206
152
  return CurrentGlobal;
207
153
  }
208
154
  })();
@@ -222,7 +168,7 @@ if (!includeOwnProperty(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__")) {
222
168
  }
223
169
  const globalLoading = CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;
224
170
  function setGlobalDefaultVal(target) {
225
- var _target___FEDERATION__, _target___FEDERATION__1, _target___FEDERATION__2, _target___FEDERATION__3, _target___FEDERATION__4, _target___FEDERATION__5;
171
+ var _a, _b, _c, _d, _e, _f;
226
172
  if (includeOwnProperty(target, "__VMOK__") && !includeOwnProperty(target, "__FEDERATION__")) {
227
173
  definePropertyGlobalVal(target, "__FEDERATION__", target.__VMOK__);
228
174
  }
@@ -237,18 +183,12 @@ function setGlobalDefaultVal(target) {
237
183
  });
238
184
  definePropertyGlobalVal(target, "__VMOK__", target.__FEDERATION__);
239
185
  }
240
- var ___GLOBAL_PLUGIN__;
241
- (___GLOBAL_PLUGIN__ = (_target___FEDERATION__ = target.__FEDERATION__).__GLOBAL_PLUGIN__) != null ? ___GLOBAL_PLUGIN__ : _target___FEDERATION__.__GLOBAL_PLUGIN__ = [];
242
- var ___INSTANCES__;
243
- (___INSTANCES__ = (_target___FEDERATION__1 = target.__FEDERATION__).__INSTANCES__) != null ? ___INSTANCES__ : _target___FEDERATION__1.__INSTANCES__ = [];
244
- var _moduleInfo;
245
- (_moduleInfo = (_target___FEDERATION__2 = target.__FEDERATION__).moduleInfo) != null ? _moduleInfo : _target___FEDERATION__2.moduleInfo = {};
246
- var ___SHARE__;
247
- (___SHARE__ = (_target___FEDERATION__3 = target.__FEDERATION__).__SHARE__) != null ? ___SHARE__ : _target___FEDERATION__3.__SHARE__ = {};
248
- var ___MANIFEST_LOADING__;
249
- (___MANIFEST_LOADING__ = (_target___FEDERATION__4 = target.__FEDERATION__).__MANIFEST_LOADING__) != null ? ___MANIFEST_LOADING__ : _target___FEDERATION__4.__MANIFEST_LOADING__ = {};
250
- var ___PRELOADED_MAP__;
251
- (___PRELOADED_MAP__ = (_target___FEDERATION__5 = target.__FEDERATION__).__PRELOADED_MAP__) != null ? ___PRELOADED_MAP__ : _target___FEDERATION__5.__PRELOADED_MAP__ = /* @__PURE__ */ new Map();
186
+ (_a = target.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (_a.__GLOBAL_PLUGIN__ = []);
187
+ (_b = target.__FEDERATION__).__INSTANCES__ ?? (_b.__INSTANCES__ = []);
188
+ (_c = target.__FEDERATION__).moduleInfo ?? (_c.moduleInfo = {});
189
+ (_d = target.__FEDERATION__).__SHARE__ ?? (_d.__SHARE__ = {});
190
+ (_e = target.__FEDERATION__).__MANIFEST_LOADING__ ?? (_e.__MANIFEST_LOADING__ = {});
191
+ (_f = target.__FEDERATION__).__PRELOADED_MAP__ ?? (_f.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
252
192
  }
253
193
  setGlobalDefaultVal(CurrentGlobal);
254
194
  setGlobalDefaultVal(nativeGlobal);
@@ -271,7 +211,7 @@ function getGlobalFederationConstructor() {
271
211
  function setGlobalFederationConstructor(FederationConstructor, isDebug = index_esm.isDebugMode()) {
272
212
  if (isDebug) {
273
213
  CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
274
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.19.1";
214
+ CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.20.0";
275
215
  }
276
216
  }
277
217
  function getInfoWithoutType(target, key) {
@@ -315,9 +255,7 @@ const getTargetSnapshotInfoByModuleInfo = (moduleInfo, snapshot) => {
315
255
  return getModuleInfo;
316
256
  }
317
257
  if ("version" in moduleInfo && moduleInfo["version"]) {
318
- const { version } = moduleInfo, resModuleInfo = _object_without_properties_loose(moduleInfo, [
319
- "version"
320
- ]);
258
+ const { version, ...resModuleInfo } = moduleInfo;
321
259
  const moduleKeyWithoutVersion = getFMId(resModuleInfo);
322
260
  const getModuleInfoWithoutVersion = getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo, moduleKeyWithoutVersion).value;
323
261
  if ((getModuleInfoWithoutVersion == null ? void 0 : getModuleInfoWithoutVersion.version) === version) {
@@ -333,7 +271,10 @@ const setGlobalSnapshotInfoByModuleInfo = (remoteInfo, moduleDetailInfo) => {
333
271
  return nativeGlobal.__FEDERATION__.moduleInfo;
334
272
  };
335
273
  const addGlobalSnapshot = (moduleInfos) => {
336
- nativeGlobal.__FEDERATION__.moduleInfo = _extends$1({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
274
+ nativeGlobal.__FEDERATION__.moduleInfo = {
275
+ ...nativeGlobal.__FEDERATION__.moduleInfo,
276
+ ...moduleInfos
277
+ };
337
278
  return () => {
338
279
  const keys = Object.keys(moduleInfos);
339
280
  for (const key of keys) {
@@ -667,6 +608,7 @@ function satisfy(version, range) {
667
608
  const versionAtom = {
668
609
  operator: versionOperator,
669
610
  version: combineVersion(versionMajor, versionMinor, versionPatch, versionPreRelease),
611
+ // exclude build atom
670
612
  major: versionMajor,
671
613
  minor: versionMinor,
672
614
  patch: versionPatch,
@@ -805,9 +747,7 @@ function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare
805
747
  return;
806
748
  }
807
749
  const { shareConfig, scope = DEFAULT_SCOPE, strategy } = shareInfo;
808
- const scopes = Array.isArray(scope) ? scope : [
809
- scope
810
- ];
750
+ const scopes = Array.isArray(scope) ? scope : [scope];
811
751
  for (const sc of scopes) {
812
752
  if (shareConfig && localShareScopeMap[sc] && localShareScopeMap[sc][pkgName]) {
813
753
  const { requiredVersion } = shareConfig;
@@ -929,10 +869,7 @@ async function loadSystemJsEntry({ entry, remoteEntryExports }) {
929
869
  if (typeof __system_context__ === "undefined") {
930
870
  System.import(entry).then(resolve).catch(reject);
931
871
  } else {
932
- new Function("callbacks", `System.import("${entry}")${importCallback}`)([
933
- resolve,
934
- reject
935
- ]);
872
+ new Function("callbacks", `System.import("${entry}")${importCallback}`)([resolve, reject]);
936
873
  }
937
874
  } else {
938
875
  resolve(remoteEntryExports);
@@ -960,11 +897,9 @@ async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUr
960
897
  return index_esm.loadScript(url, {
961
898
  attrs: {},
962
899
  createScriptHook: (url2, attrs) => {
963
- const res = loaderHook.lifecycle.createScript.emit({
964
- url: url2,
965
- attrs
966
- });
967
- if (!res) return;
900
+ const res = loaderHook.lifecycle.createScript.emit({ url: url2, attrs });
901
+ if (!res)
902
+ return;
968
903
  if (res instanceof HTMLScriptElement) {
969
904
  return res;
970
905
  }
@@ -988,15 +923,9 @@ async function loadEntryDom({ remoteInfo, remoteEntryExports, loaderHook, getEnt
988
923
  switch (type) {
989
924
  case "esm":
990
925
  case "module":
991
- return loadEsmEntry({
992
- entry,
993
- remoteEntryExports
994
- });
926
+ return loadEsmEntry({ entry, remoteEntryExports });
995
927
  case "system":
996
- return loadSystemJsEntry({
997
- entry,
998
- remoteEntryExports
999
- });
928
+ return loadSystemJsEntry({ entry, remoteEntryExports });
1000
929
  default:
1001
930
  return loadEntryScript({
1002
931
  entry,
@@ -1014,18 +943,12 @@ async function loadEntryNode({ remoteInfo, loaderHook }) {
1014
943
  return remoteEntryExports;
1015
944
  }
1016
945
  return index_esm.loadScriptNode(entry, {
1017
- attrs: {
1018
- name,
1019
- globalName,
1020
- type
1021
- },
946
+ attrs: { name, globalName, type },
1022
947
  loaderHook: {
1023
948
  createScriptHook: (url, attrs = {}) => {
1024
- const res = loaderHook.lifecycle.createScript.emit({
1025
- url,
1026
- attrs
1027
- });
1028
- if (!res) return;
949
+ const res = loaderHook.lifecycle.createScript.emit({ url, attrs });
950
+ if (!res)
951
+ return;
1029
952
  if ("url" in res) {
1030
953
  return res;
1031
954
  }
@@ -1043,7 +966,7 @@ function getRemoteEntryUniqueKey(remoteInfo) {
1043
966
  return index_esm.composeKeyWithSeparator(name, entry);
1044
967
  }
1045
968
  async function getRemoteEntry(params) {
1046
- const { origin, remoteEntryExports, remoteInfo, getEntryUrl } = params;
969
+ const { origin, remoteEntryExports, remoteInfo, getEntryUrl, _inErrorHandling = false } = params;
1047
970
  const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
1048
971
  if (remoteEntryExports) {
1049
972
  return remoteEntryExports;
@@ -1065,21 +988,39 @@ async function getRemoteEntry(params) {
1065
988
  remoteEntryExports,
1066
989
  loaderHook,
1067
990
  getEntryUrl
1068
- }) : loadEntryNode({
1069
- remoteInfo,
1070
- loaderHook
1071
- });
991
+ }) : loadEntryNode({ remoteInfo, loaderHook });
992
+ }).catch(async (err) => {
993
+ const uniqueKey2 = getRemoteEntryUniqueKey(remoteInfo);
994
+ const isScriptLoadError = err instanceof Error && err.message.includes(RUNTIME_008);
995
+ if (isScriptLoadError && !_inErrorHandling) {
996
+ const wrappedGetRemoteEntry = (params2) => {
997
+ return getRemoteEntry({ ...params2, _inErrorHandling: true });
998
+ };
999
+ const RemoteEntryExports = await origin.loaderHook.lifecycle.loadEntryError.emit({
1000
+ getRemoteEntry: wrappedGetRemoteEntry,
1001
+ origin,
1002
+ remoteInfo,
1003
+ remoteEntryExports,
1004
+ globalLoading,
1005
+ uniqueKey: uniqueKey2
1006
+ });
1007
+ if (RemoteEntryExports) {
1008
+ return RemoteEntryExports;
1009
+ }
1010
+ }
1011
+ throw err;
1072
1012
  });
1073
1013
  }
1074
1014
  return globalLoading[uniqueKey];
1075
1015
  }
1076
1016
  function getRemoteInfo(remote) {
1077
- return _extends$1({}, remote, {
1017
+ return {
1018
+ ...remote,
1078
1019
  entry: "entry" in remote ? remote.entry : "",
1079
1020
  type: remote.type || DEFAULT_REMOTE_TYPE,
1080
1021
  entryGlobalName: remote.entryGlobalName || remote.name,
1081
1022
  shareScope: remote.shareScope || DEFAULT_SCOPE
1082
- });
1023
+ };
1083
1024
  }
1084
1025
  function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
1085
1026
  const { cssAssets, jsAssetsWithoutEntry, entryAssets } = assets;
@@ -1236,29 +1177,12 @@ var helpers$1 = {
1236
1177
  }
1237
1178
  };
1238
1179
  typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN === "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : true;
1239
- function getBuilderId() {
1240
- return typeof FEDERATION_BUILD_IDENTIFIER !== "undefined" ? FEDERATION_BUILD_IDENTIFIER : "";
1241
- }
1242
- function getGlobalFederationInstance(name, version) {
1243
- const buildId = getBuilderId();
1244
- return CurrentGlobal.__FEDERATION__.__INSTANCES__.find((GMInstance) => {
1245
- if (buildId && GMInstance.options.id === buildId) {
1246
- return true;
1247
- }
1248
- if (GMInstance.options.name === name && !GMInstance.options.version && !version) {
1249
- return true;
1250
- }
1251
- if (GMInstance.options.name === name && version && GMInstance.options.version === version) {
1252
- return true;
1253
- }
1254
- return false;
1255
- });
1256
- }
1257
- var helpers = _extends$2({}, helpers$1, {
1258
- global: _extends$2({}, helpers$1.global, {
1259
- getGlobalFederationInstance
1260
- })
1261
- });
1180
+ var helpers = {
1181
+ ...helpers$1,
1182
+ global: {
1183
+ ...helpers$1.global
1184
+ }
1185
+ };
1262
1186
  async function prefetch(options) {
1263
1187
  const { instance, id, dataFetchParams, preloadComponentResource } = options;
1264
1188
  if (!id) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const ReactRouterDom$1 = require("react-router-dom/index.js");
5
- const index = require("./index-eN2xRRXs.js");
5
+ const index = require("./index-DqCpgmgH.js");
6
6
  const ReactRouterDom = require("react-router-dom/index.js");
7
7
  function _interopNamespaceDefault(e) {
8
8
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1,6 +1,6 @@
1
1
  import React__default, { useContext } from "react";
2
2
  import * as ReactRouterDom$1 from "react-router-dom/index.js";
3
- import { R as RouterContext, L as LoggerInstance } from "./index-rAO0Wr0M.mjs";
3
+ import { R as RouterContext, L as LoggerInstance } from "./index-Dm-M9ouh.mjs";
4
4
  export * from "react-router-dom/index.js";
5
5
  function WraperRouter(props) {
6
6
  const { basename, ...propsRes } = props;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const ReactRouterDom$1 = require("react-router-dom/dist/index.js");
5
- const index = require("./index-eN2xRRXs.js");
5
+ const index = require("./index-DqCpgmgH.js");
6
6
  const ReactRouterDom = require("react-router-dom/dist/index.js");
7
7
  function _interopNamespaceDefault(e) {
8
8
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1,6 +1,6 @@
1
1
  import React__default, { useContext } from "react";
2
2
  import * as ReactRouterDom$1 from "react-router-dom/dist/index.js";
3
- import { R as RouterContext, L as LoggerInstance } from "./index-rAO0Wr0M.mjs";
3
+ import { R as RouterContext, L as LoggerInstance } from "./index-Dm-M9ouh.mjs";
4
4
  export * from "react-router-dom/dist/index.js";
5
5
  function WraperRouter(props) {
6
6
  const { basename, ...propsRes } = props;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const ReactRouterDom = require("react-router-dom/");
5
- const index = require("./index-eN2xRRXs.js");
5
+ const index = require("./index-DqCpgmgH.js");
6
6
  function _interopNamespaceDefault(e) {
7
7
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
8
  if (e) {
package/dist/router.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React__default, { useContext } from "react";
2
2
  import * as ReactRouterDom from "react-router-dom/";
3
3
  export * from "react-router-dom/";
4
- import { R as RouterContext, L as LoggerInstance } from "./index-rAO0Wr0M.mjs";
4
+ import { R as RouterContext, L as LoggerInstance } from "./index-Dm-M9ouh.mjs";
5
5
  function WrapperRouter(props) {
6
6
  const { basename, ...propsRes } = props;
7
7
  const routerContextProps = useContext(RouterContext) || {};
@@ -19,7 +19,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
19
19
  }
20
20
  });
21
21
  var _a, _constructing, _b, _c, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _memoMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _LRUCache_instances, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, indexes_fn, rindexes_fn, isValidIndex_fn, evict_fn, backgroundFetch_fn, isBackgroundFetch_fn, connect_fn, moveToTail_fn, delete_fn, clear_fn;
22
- const index_esm = require("./index.esm-Ju4RY-yW.js");
22
+ const index_esm = require("./index.esm-CzoIcLts.js");
23
23
  const PLUGIN_IDENTIFIER = "[ Module Federation React ]";
24
24
  const DOWNGRADE_KEY = "_mfSSRDowngrade";
25
25
  const DATA_FETCH_FUNCTION = "_mfDataFetch";
@@ -18,7 +18,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
18
18
  }
19
19
  });
20
20
  var _a, _constructing, _b, _c, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _memoMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _LRUCache_instances, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, indexes_fn, rindexes_fn, isValidIndex_fn, evict_fn, backgroundFetch_fn, isBackgroundFetch_fn, connect_fn, moveToTail_fn, delete_fn, clear_fn;
21
- import { c as createLogger, i as isBrowserEnv, a as composeKeyWithSeparator } from "./index.esm-CtI0uQUR.mjs";
21
+ import { c as createLogger, d as isBrowserEnv, e as composeKeyWithSeparator } from "./index.esm-JLwyxgUK.mjs";
22
22
  const PLUGIN_IDENTIFIER = "[ Module Federation React ]";
23
23
  const DOWNGRADE_KEY = "_mfSSRDowngrade";
24
24
  const DATA_FETCH_FUNCTION = "_mfDataFetch";
package/dist/v18.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const client = require("react-dom/client");
4
- const bridgeBase = require("./bridge-base-Ds850AOx.js");
4
+ const bridgeBase = require("./bridge-base-Bn6DO0Fi.js");
5
5
  function createReact18Root(container, options) {
6
6
  return client.createRoot(container, options);
7
7
  }
package/dist/v18.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRoot } from "react-dom/client";
2
- import { c as createBaseBridgeComponent } from "./bridge-base-BwHtOqw_.mjs";
2
+ import { c as createBaseBridgeComponent } from "./bridge-base-DxcR1fja.mjs";
3
3
  function createReact18Root(container, options) {
4
4
  return createRoot(container, options);
5
5
  }
package/dist/v19.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const client = require("react-dom/client");
4
- const bridgeBase = require("./bridge-base-Ds850AOx.js");
4
+ const bridgeBase = require("./bridge-base-Bn6DO0Fi.js");
5
5
  function createReact19Root(container, options) {
6
6
  return client.createRoot(container, options);
7
7
  }
package/dist/v19.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRoot } from "react-dom/client";
2
- import { c as createBaseBridgeComponent } from "./bridge-base-BwHtOqw_.mjs";
2
+ import { c as createBaseBridgeComponent } from "./bridge-base-DxcR1fja.mjs";
3
3
  function createReact19Root(container, options) {
4
4
  return createRoot(container, options);
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/bridge-react",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "sideEffects": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -95,8 +95,8 @@
95
95
  "dependencies": {
96
96
  "react-error-boundary": "^4.1.2",
97
97
  "lru-cache": "^10.4.3",
98
- "@module-federation/bridge-shared": "0.19.1",
99
- "@module-federation/sdk": "0.19.1"
98
+ "@module-federation/sdk": "0.20.0",
99
+ "@module-federation/bridge-shared": "0.20.0"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "react": ">=16.9.0",
@@ -115,11 +115,11 @@
115
115
  "react-dom": "18.3.1",
116
116
  "react-router-dom": "6.22.3",
117
117
  "typescript": "^5.2.2",
118
- "vite": "^5.4.18",
118
+ "vite": "^5.4.20",
119
119
  "vite-plugin-dts": "^4.3.0",
120
120
  "hono": "3.12.12",
121
- "@module-federation/runtime": "0.19.1",
122
- "@module-federation/runtime-core": "0.19.1"
121
+ "@module-federation/runtime": "0.20.0",
122
+ "@module-federation/runtime-core": "0.20.0"
123
123
  },
124
124
  "scripts": {
125
125
  "dev": "vite",