chayns-api 1.1.0-24 → 1.1.0-25
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.
|
@@ -30,7 +30,12 @@ const componentMap = {};
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
const loadModule = (scope, module, url, preventSingleton = false) => {
|
|
33
|
+
const loadModule = async (scope, module, url, preventSingleton = false) => {
|
|
34
|
+
// @ts-expect-error
|
|
35
|
+
if (typeof __webpack_init_sharing__ === 'function') {
|
|
36
|
+
// @ts-expect-error
|
|
37
|
+
await __webpack_init_sharing__('default');
|
|
38
|
+
}
|
|
34
39
|
if (registeredScopes[scope] !== url || preventSingleton) {
|
|
35
40
|
if (scope in registeredScopes) {
|
|
36
41
|
console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
|
|
@@ -23,8 +23,13 @@ init({
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
export const loadModule = function (scope, module, url) {
|
|
26
|
+
export const loadModule = async function (scope, module, url) {
|
|
27
27
|
let preventSingleton = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
28
|
+
// @ts-expect-error
|
|
29
|
+
if (typeof __webpack_init_sharing__ === 'function') {
|
|
30
|
+
// @ts-expect-error
|
|
31
|
+
await __webpack_init_sharing__('default');
|
|
32
|
+
}
|
|
28
33
|
if (registeredScopes[scope] !== url || preventSingleton) {
|
|
29
34
|
if (scope in registeredScopes) {
|
|
30
35
|
console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const loadModule: (scope: any, module: any, url: any, preventSingleton?: boolean) => any
|
|
1
|
+
export declare const loadModule: (scope: any, module: any, url: any, preventSingleton?: boolean) => Promise<any>;
|
|
2
2
|
declare const loadComponent: (scope: any, module: any, url: any, skipCompatMode?: boolean, preventSingleton?: boolean) => any;
|
|
3
3
|
export default loadComponent;
|