@ice/mf-runtime 0.0.11-beta.3 → 0.0.11-beta.4

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.
package/es2017/index.js CHANGED
@@ -21,7 +21,7 @@ function generateUniqueId() {
21
21
  export function initByMicroMods(microMods, hostName) {
22
22
  const remotes = microMods.map((microMod)=>{
23
23
  var _microMod_remoteEntry;
24
- const isLegacy = !((_microMod_remoteEntry = microMod.remoteEntry) === null || _microMod_remoteEntry === void 0 ? void 0 : _microMod_remoteEntry.match(/\/mf\/remoteEntry\.js$/));
24
+ const isLegacy = !((_microMod_remoteEntry = microMod.remoteEntry) === null || _microMod_remoteEntry === void 0 ? void 0 : _microMod_remoteEntry.match(/\/mf\/.*\/remoteEntry\.js$/));
25
25
  const remote = {
26
26
  name: microMod.moduleFederatedName,
27
27
  entry: microMod.remoteEntry,
@@ -6,7 +6,7 @@ const loadRemotePackagedReactAndRender = async (args)=>{
6
6
  const remoteInstance = __FEDERATION__.__INSTANCES__.find(// @ts-expect-error wrong type
7
7
  (instance)=>instance.name === args.remote.name);
8
8
  const remoteVersion = remoteInstance ? (_remoteInstance_options = remoteInstance.options) === null || _remoteInstance_options === void 0 ? void 0 : (_remoteInstance_options_shared = _remoteInstance_options.shared) === null || _remoteInstance_options_shared === void 0 ? void 0 : (_remoteInstance_options_shared_reactdom = _remoteInstance_options_shared['react-dom']) === null || _remoteInstance_options_shared_reactdom === void 0 ? void 0 : (_remoteInstance_options_shared_reactdom_ = _remoteInstance_options_shared_reactdom[0]) === null || _remoteInstance_options_shared_reactdom_ === void 0 ? void 0 : _remoteInstance_options_shared_reactdom_.version : false;
9
- if (remoteVersion && hostVersion && remoteVersion !== hostVersion) {
9
+ if (remoteVersion && hostVersion) {
10
10
  var _sharedOptions_find;
11
11
  const remoteReactDOM = await remoteInstance.loadShare('react-dom', {
12
12
  resolver: (sharedOptions)=>(_sharedOptions_find = sharedOptions.find((i)=>i.version === remoteVersion)) !== null && _sharedOptions_find !== void 0 ? _sharedOptions_find : sharedOptions[0]
package/esm/index.js CHANGED
@@ -21,7 +21,7 @@ function generateUniqueId() {
21
21
  export function initByMicroMods(microMods, hostName) {
22
22
  var remotes = microMods.map(function(microMod) {
23
23
  var _microMod_remoteEntry;
24
- var isLegacy = !((_microMod_remoteEntry = microMod.remoteEntry) === null || _microMod_remoteEntry === void 0 ? void 0 : _microMod_remoteEntry.match(/\/mf\/remoteEntry\.js$/));
24
+ var isLegacy = !((_microMod_remoteEntry = microMod.remoteEntry) === null || _microMod_remoteEntry === void 0 ? void 0 : _microMod_remoteEntry.match(/\/mf\/.*\/remoteEntry\.js$/));
25
25
  var remote = {
26
26
  name: microMod.moduleFederatedName,
27
27
  entry: microMod.remoteEntry,
@@ -14,7 +14,7 @@ var loadRemotePackagedReactAndRender = function() {
14
14
  return instance.name === args.remote.name;
15
15
  });
16
16
  remoteVersion = remoteInstance ? (_remoteInstance_options = remoteInstance.options) === null || _remoteInstance_options === void 0 ? void 0 : (_remoteInstance_options_shared = _remoteInstance_options.shared) === null || _remoteInstance_options_shared === void 0 ? void 0 : (_remoteInstance_options_shared_reactdom = _remoteInstance_options_shared["react-dom"]) === null || _remoteInstance_options_shared_reactdom === void 0 ? void 0 : (_remoteInstance_options_shared_reactdom_ = _remoteInstance_options_shared_reactdom[0]) === null || _remoteInstance_options_shared_reactdom_ === void 0 ? void 0 : _remoteInstance_options_shared_reactdom_.version : false;
17
- if (!(remoteVersion && hostVersion && remoteVersion !== hostVersion)) return [
17
+ if (!(remoteVersion && hostVersion)) return [
18
18
  3,
19
19
  4
20
20
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ice/mf-runtime",
3
- "version": "0.0.11-beta.3",
3
+ "version": "0.0.11-beta.4",
4
4
  "description": "ice mf runtime",
5
5
  "files": [
6
6
  "esm",