@module-federation/runtime 0.0.0-next-20240411115459 → 0.0.0-next-20240411125344
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 +6 -4
- package/dist/index.esm.js +6 -4
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -828,13 +828,15 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
828
828
|
remoteSnapshot.shared.forEach((shared)=>{
|
|
829
829
|
var _options_shared;
|
|
830
830
|
const shareInfos = (_options_shared = options.shared) == null ? void 0 : _options_shared[shared.sharedName];
|
|
831
|
+
if (!shareInfos) {
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
831
834
|
// if no version, preload all shared
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
if (!shareInfo) {
|
|
835
|
+
const sharedOptions = shared.version ? shareInfos.find((s)=>s.version === shared.version) : shareInfos;
|
|
836
|
+
if (!sharedOptions) {
|
|
835
837
|
return;
|
|
836
838
|
}
|
|
837
|
-
const arrayShareInfo = share.arrayOptions(
|
|
839
|
+
const arrayShareInfo = share.arrayOptions(sharedOptions);
|
|
838
840
|
arrayShareInfo.forEach((s)=>{
|
|
839
841
|
collectSharedAssets(s, shared);
|
|
840
842
|
});
|
package/dist/index.esm.js
CHANGED
|
@@ -826,13 +826,15 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
826
826
|
remoteSnapshot.shared.forEach((shared)=>{
|
|
827
827
|
var _options_shared;
|
|
828
828
|
const shareInfos = (_options_shared = options.shared) == null ? void 0 : _options_shared[shared.sharedName];
|
|
829
|
+
if (!shareInfos) {
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
829
832
|
// if no version, preload all shared
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
if (!shareInfo) {
|
|
833
|
+
const sharedOptions = shared.version ? shareInfos.find((s)=>s.version === shared.version) : shareInfos;
|
|
834
|
+
if (!sharedOptions) {
|
|
833
835
|
return;
|
|
834
836
|
}
|
|
835
|
-
const arrayShareInfo = arrayOptions(
|
|
837
|
+
const arrayShareInfo = arrayOptions(sharedOptions);
|
|
836
838
|
arrayShareInfo.forEach((s)=>{
|
|
837
839
|
collectSharedAssets(s, shared);
|
|
838
840
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/runtime",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240411125344",
|
|
4
4
|
"author": "zhouxiao <codingzx@gmail.com>",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
48
|
+
"@module-federation/sdk": "0.0.0-next-20240411125344"
|
|
49
49
|
}
|
|
50
50
|
}
|