chayns-api 1.1.0-27 → 1.1.0-29

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.
@@ -38,7 +38,8 @@ const loadModule = async (scope, module, url, preventSingleton = false) => {
38
38
  (0, _runtime.registerRemotes)([{
39
39
  name: scope,
40
40
  entry: url,
41
- alias: scope
41
+ alias: scope,
42
+ shareScope: 'defaultV2'
42
43
  }], {
43
44
  force: scope in registeredScopes
44
45
  });
@@ -48,7 +49,9 @@ const loadModule = async (scope, module, url, preventSingleton = false) => {
48
49
  }
49
50
  if (!(module in moduleMap[scope])) {
50
51
  const path = `${scope}/${module.replace(/^\.\//, '')}`;
51
- const promise = (0, _runtime.loadRemote)(path);
52
+ const promise = (0, _runtime.loadRemote)(path, {
53
+ from: 'runtime'
54
+ });
52
55
  promise.catch(e => {
53
56
  console.error("[chayns-api] Failed to load module", scope, url, e);
54
57
  // causes registerRemote with force = true on next attempt to load the component which tries to load the component again
@@ -32,7 +32,8 @@ export const loadModule = async function (scope, module, url) {
32
32
  registerRemotes([{
33
33
  name: scope,
34
34
  entry: url,
35
- alias: scope
35
+ alias: scope,
36
+ shareScope: 'defaultV2'
36
37
  }], {
37
38
  force: scope in registeredScopes
38
39
  });
@@ -42,7 +43,9 @@ export const loadModule = async function (scope, module, url) {
42
43
  }
43
44
  if (!(module in moduleMap[scope])) {
44
45
  const path = `${scope}/${module.replace(/^\.\//, '')}`;
45
- const promise = loadRemote(path);
46
+ const promise = loadRemote(path, {
47
+ from: 'runtime'
48
+ });
46
49
  promise.catch(e => {
47
50
  console.error("[chayns-api] Failed to load module", scope, url, e);
48
51
  // causes registerRemote with force = true on next attempt to load the component which tries to load the component again
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.1.0-27",
3
+ "version": "1.1.0-29",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",