chayns-api 1.2.0-15 → 1.2.0-16

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.
@@ -21,6 +21,7 @@ const loadModule = (scope, module, url, preventSingleton = false) => {
21
21
  if (scope in registeredScopes) {
22
22
  console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
23
23
  }
24
+ console.log("load module", scope, module, url);
24
25
  registerRemotes([{
25
26
  shareScope: url.endsWith('v2.remoteEntry.js') ? 'chayns-api' : 'default',
26
27
  name: scope,
@@ -83,7 +84,7 @@ const loadComponent = (scope, module, url, skipCompatMode = false, preventSingle
83
84
  }) => {
84
85
  return _semver.default.gt(version, hostVersion) && _semver.default.satisfies(version, requiredVersion) || scope === from.split('-').join('_');
85
86
  });
86
- if (!matchReactVersion || environment !== 'production' || process.env.NODE_ENV === 'development') {
87
+ if (!matchReactVersion || environment !== 'production' || process.env.NODE_ENV === 'development' || Module.default.version !== 2) {
87
88
  return {
88
89
  default: Module.default.CompatComponent
89
90
  };
@@ -15,6 +15,7 @@ export const loadModule = function (scope, module, url) {
15
15
  if (scope in registeredScopes) {
16
16
  console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
17
17
  }
18
+ console.log("load module", scope, module, url);
18
19
  registerRemotes([{
19
20
  shareScope: url.endsWith('v2.remoteEntry.js') ? 'chayns-api' : 'default',
20
21
  name: scope,
@@ -79,7 +80,7 @@ const loadComponent = function (scope, module, url) {
79
80
  } = _ref;
80
81
  return semver.gt(version, hostVersion) && semver.satisfies(version, requiredVersion) || scope === from.split('-').join('_');
81
82
  });
82
- if (!matchReactVersion || environment !== 'production' || process.env.NODE_ENV === 'development') {
83
+ if (!matchReactVersion || environment !== 'production' || process.env.NODE_ENV === 'development' || Module.default.version !== 2) {
83
84
  return {
84
85
  default: Module.default.CompatComponent
85
86
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.2.0-15",
3
+ "version": "1.2.0-16",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",