@module-federation/webpack-bundler-runtime 0.7.2 → 0.7.3
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.
- package/dist/index.cjs.js +11 -4
- package/dist/index.esm.mjs +11 -4
- package/package.json +4 -4
- package/dist/package.json +0 -54
package/dist/index.cjs.js
CHANGED
|
@@ -95,10 +95,17 @@ function remotes(options) {
|
|
|
95
95
|
try {
|
|
96
96
|
const remoteName = sdk.decodeName(remoteInfos[0].name, sdk.ENCODE_NAME_PREFIX);
|
|
97
97
|
const remoteModuleName = remoteName + data[1].slice(1);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
const instance = webpackRequire.federation.instance;
|
|
99
|
+
const loadRemote = ()=>webpackRequire.federation.instance.loadRemote(remoteModuleName, {
|
|
100
|
+
loadFactory: false,
|
|
101
|
+
from: 'build'
|
|
102
|
+
});
|
|
103
|
+
if (instance.options.shareStrategy === 'version-first') {
|
|
104
|
+
return Promise.all(instance.sharedHandler.initializeSharing(data[0])).then(()=>{
|
|
105
|
+
return loadRemote();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return loadRemote();
|
|
102
109
|
} catch (error) {
|
|
103
110
|
onError(error);
|
|
104
111
|
}
|
package/dist/index.esm.mjs
CHANGED
|
@@ -74,10 +74,17 @@ function remotes(options) {
|
|
|
74
74
|
try {
|
|
75
75
|
const remoteName = decodeName(remoteInfos[0].name, ENCODE_NAME_PREFIX);
|
|
76
76
|
const remoteModuleName = remoteName + data[1].slice(1);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const instance = webpackRequire.federation.instance;
|
|
78
|
+
const loadRemote = ()=>webpackRequire.federation.instance.loadRemote(remoteModuleName, {
|
|
79
|
+
loadFactory: false,
|
|
80
|
+
from: 'build'
|
|
81
|
+
});
|
|
82
|
+
if (instance.options.shareStrategy === 'version-first') {
|
|
83
|
+
return Promise.all(instance.sharedHandler.initializeSharing(data[0])).then(()=>{
|
|
84
|
+
return loadRemote();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return loadRemote();
|
|
81
88
|
} catch (error) {
|
|
82
89
|
onError(error);
|
|
83
90
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"public": true,
|
|
3
3
|
"name": "@module-federation/webpack-bundler-runtime",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Module Federation Runtime for webpack",
|
|
7
7
|
"keywords": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"module": "./dist/index.esm.mjs",
|
|
21
21
|
"types": "./dist/index.cjs.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@module-federation/runtime": "0.7.
|
|
24
|
-
"@module-federation/sdk": "0.7.
|
|
23
|
+
"@module-federation/runtime": "0.7.3",
|
|
24
|
+
"@module-federation/sdk": "0.7.3"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@module-federation/runtime": "0.7.
|
|
52
|
+
"@module-federation/runtime": "0.7.3"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/dist/package.json
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"public": true,
|
|
3
|
-
"name": "@module-federation/webpack-bundler-runtime",
|
|
4
|
-
"version": "0.7.2",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"description": "Module Federation Runtime for webpack",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"Module Federation",
|
|
9
|
-
"bundler runtime"
|
|
10
|
-
],
|
|
11
|
-
"files": [
|
|
12
|
-
"dist/",
|
|
13
|
-
"README.md"
|
|
14
|
-
],
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
},
|
|
18
|
-
"author": "zhanghang <hanric.zhang@gmail.com>",
|
|
19
|
-
"main": "./index.cjs.js",
|
|
20
|
-
"module": "./index.esm.js",
|
|
21
|
-
"types": "./dist/index.cjs.d.ts",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@module-federation/runtime": "workspace:*",
|
|
24
|
-
"@module-federation/sdk": "workspace:*"
|
|
25
|
-
},
|
|
26
|
-
"exports": {
|
|
27
|
-
".": {
|
|
28
|
-
"import": "./dist/index.esm.mjs",
|
|
29
|
-
"require": "./dist/index.cjs.js"
|
|
30
|
-
},
|
|
31
|
-
"./constant": {
|
|
32
|
-
"import": "./dist/constant.esm.mjs",
|
|
33
|
-
"require": "./dist/constant.cjs.js"
|
|
34
|
-
},
|
|
35
|
-
"./container": {
|
|
36
|
-
"import": "./dist/container.esm.mjs",
|
|
37
|
-
"require": "./dist/container.cjs.js"
|
|
38
|
-
},
|
|
39
|
-
"./*": "./*"
|
|
40
|
-
},
|
|
41
|
-
"typesVersions": {
|
|
42
|
-
"*": {
|
|
43
|
-
".": [
|
|
44
|
-
"./dist/index.cjs.d.ts"
|
|
45
|
-
],
|
|
46
|
-
"constant": [
|
|
47
|
-
"./dist/constant.cjs.d.ts"
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@module-federation/runtime": "workspace:*"
|
|
53
|
-
}
|
|
54
|
-
}
|