chayns-api 2.1.3-0 → 2.1.3-1

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.
@@ -54,12 +54,13 @@ const loadComponent = (scope, module, url, skipCompatMode = false, preventSingle
54
54
  getInstance
55
55
  } = globalThis.moduleFederationRuntime;
56
56
  const {
57
- componentMap
57
+ componentMap,
58
+ registeredScopes
58
59
  } = globalThis.moduleFederationScopes;
59
60
  if (!componentMap[scope]) {
60
61
  componentMap[scope] = {};
61
62
  }
62
- if (!(module in componentMap[scope])) {
63
+ if (!(module in componentMap[scope]) || registeredScopes[scope] !== url) {
63
64
  const promise = loadModule(scope, module, url, preventSingleton).then(async Module => {
64
65
  if (typeof Module.default === 'function') {
65
66
  return Module;
@@ -49,12 +49,13 @@ const loadComponent = function (scope, module, url) {
49
49
  getInstance
50
50
  } = globalThis.moduleFederationRuntime;
51
51
  const {
52
- componentMap
52
+ componentMap,
53
+ registeredScopes
53
54
  } = globalThis.moduleFederationScopes;
54
55
  if (!componentMap[scope]) {
55
56
  componentMap[scope] = {};
56
57
  }
57
- if (!(module in componentMap[scope])) {
58
+ if (!(module in componentMap[scope]) || registeredScopes[scope] !== url) {
58
59
  const promise = loadModule(scope, module, url, preventSingleton).then(async Module => {
59
60
  if (typeof Module.default === 'function') {
60
61
  return Module;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.1.3-0",
3
+ "version": "2.1.3-1",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",