@module-federation/modern-js 0.19.1 → 0.20.0
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.
|
@@ -66,7 +66,14 @@ const getMFConfig = async (userConfig) => {
|
|
|
66
66
|
return mfConfig;
|
|
67
67
|
};
|
|
68
68
|
const injectRuntimePlugins = (runtimePlugin, runtimePlugins) => {
|
|
69
|
-
|
|
69
|
+
const pluginName = typeof runtimePlugin === "string" ? runtimePlugin : runtimePlugin[0];
|
|
70
|
+
const hasPlugin = runtimePlugins.some((existingPlugin) => {
|
|
71
|
+
if (typeof existingPlugin === "string") {
|
|
72
|
+
return existingPlugin === pluginName;
|
|
73
|
+
}
|
|
74
|
+
return existingPlugin[0] === pluginName;
|
|
75
|
+
});
|
|
76
|
+
if (!hasPlugin) {
|
|
70
77
|
runtimePlugins.push(runtimePlugin);
|
|
71
78
|
}
|
|
72
79
|
};
|
|
@@ -58,7 +58,14 @@ var getMFConfig = function() {
|
|
|
58
58
|
};
|
|
59
59
|
}();
|
|
60
60
|
var injectRuntimePlugins = function(runtimePlugin, runtimePlugins) {
|
|
61
|
-
|
|
61
|
+
var pluginName = typeof runtimePlugin === "string" ? runtimePlugin : runtimePlugin[0];
|
|
62
|
+
var hasPlugin = runtimePlugins.some(function(existingPlugin) {
|
|
63
|
+
if (typeof existingPlugin === "string") {
|
|
64
|
+
return existingPlugin === pluginName;
|
|
65
|
+
}
|
|
66
|
+
return existingPlugin[0] === pluginName;
|
|
67
|
+
});
|
|
68
|
+
if (!hasPlugin) {
|
|
62
69
|
runtimePlugins.push(runtimePlugin);
|
|
63
70
|
}
|
|
64
71
|
};
|
|
@@ -25,7 +25,14 @@ const getMFConfig = async (userConfig) => {
|
|
|
25
25
|
return mfConfig;
|
|
26
26
|
};
|
|
27
27
|
const injectRuntimePlugins = (runtimePlugin, runtimePlugins) => {
|
|
28
|
-
|
|
28
|
+
const pluginName = typeof runtimePlugin === "string" ? runtimePlugin : runtimePlugin[0];
|
|
29
|
+
const hasPlugin = runtimePlugins.some((existingPlugin) => {
|
|
30
|
+
if (typeof existingPlugin === "string") {
|
|
31
|
+
return existingPlugin === pluginName;
|
|
32
|
+
}
|
|
33
|
+
return existingPlugin[0] === pluginName;
|
|
34
|
+
});
|
|
35
|
+
if (!hasPlugin) {
|
|
29
36
|
runtimePlugins.push(runtimePlugin);
|
|
30
37
|
}
|
|
31
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/modern-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
"@swc/helpers": "^0.5.17",
|
|
120
120
|
"node-fetch": "~3.3.0",
|
|
121
121
|
"react-error-boundary": "4.1.2",
|
|
122
|
-
"@module-federation/
|
|
123
|
-
"@module-federation/
|
|
124
|
-
"@module-federation/
|
|
125
|
-
"@module-federation/
|
|
126
|
-
"@module-federation/
|
|
127
|
-
"@module-federation/cli": "0.
|
|
128
|
-
"@module-federation/
|
|
122
|
+
"@module-federation/rsbuild-plugin": "0.20.0",
|
|
123
|
+
"@module-federation/enhanced": "0.20.0",
|
|
124
|
+
"@module-federation/runtime": "0.20.0",
|
|
125
|
+
"@module-federation/node": "2.7.18",
|
|
126
|
+
"@module-federation/bridge-react": "0.20.0",
|
|
127
|
+
"@module-federation/cli": "0.20.0",
|
|
128
|
+
"@module-federation/sdk": "0.20.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
131
|
"@modern-js/core": "2.68.2",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@modern-js/tsconfig": "2.68.2",
|
|
138
138
|
"@types/react": "^18.3.11",
|
|
139
139
|
"@types/react-dom": "^18.3.0",
|
|
140
|
-
"@module-federation/manifest": "0.
|
|
140
|
+
"@module-federation/manifest": "0.20.0"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
|
143
143
|
"react": ">=17",
|