chayns-api 1.2.0-7 → 1.2.0-8

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.
@@ -22,6 +22,7 @@ const loadModule = (scope, module, url, preventSingleton = false) => {
22
22
  console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
23
23
  }
24
24
  registerRemotes([{
25
+ shareScope: 'chayns-api2',
25
26
  name: scope,
26
27
  entry: url,
27
28
  alias: scope
@@ -72,6 +73,7 @@ const loadComponent = (scope, module, url, skipCompatMode = false, preventSingle
72
73
  loadShareSync('react', {
73
74
  resolver: shareOptions => {
74
75
  resolve(shareOptions);
76
+ console.log("shareOptions", shareOptions);
75
77
  return shareOptions[0];
76
78
  }
77
79
  });
@@ -29,12 +29,12 @@ const initModuleFederationSharing = () => {
29
29
  shared: {
30
30
  react: {
31
31
  version: _react.default.version,
32
- scope: 'default',
32
+ scope: 'chayns-api2',
33
33
  lib: () => _react.default
34
34
  },
35
35
  'react-dom': {
36
36
  version: _reactDom.default.version,
37
- scope: 'default',
37
+ scope: 'chayns-api2',
38
38
  lib: () => _reactDom.default
39
39
  }
40
40
  }
@@ -16,6 +16,7 @@ export const loadModule = function (scope, module, url) {
16
16
  console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
17
17
  }
18
18
  registerRemotes([{
19
+ shareScope: 'chayns-api2',
19
20
  name: scope,
20
21
  entry: url,
21
22
  alias: scope
@@ -67,6 +68,7 @@ const loadComponent = function (scope, module, url) {
67
68
  loadShareSync('react', {
68
69
  resolver: shareOptions => {
69
70
  resolve(shareOptions);
71
+ console.log("shareOptions", shareOptions);
70
72
  return shareOptions[0];
71
73
  }
72
74
  });
@@ -22,12 +22,12 @@ export const initModuleFederationSharing = () => {
22
22
  shared: {
23
23
  react: {
24
24
  version: React.version,
25
- scope: 'default',
25
+ scope: 'chayns-api2',
26
26
  lib: () => React
27
27
  },
28
28
  'react-dom': {
29
29
  version: ReactDOM.version,
30
- scope: 'default',
30
+ scope: 'chayns-api2',
31
31
  lib: () => ReactDOM
32
32
  }
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.2.0-7",
3
+ "version": "1.2.0-8",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",