@module-federation/modern-js 0.0.0-next-20250327061542 → 0.0.0-next-20250327064442
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.
|
@@ -25,14 +25,14 @@ var import_runtime_core = require("@module-federation/enhanced/runtime-core");
|
|
|
25
25
|
const correctSsrPublicPathPlugin = () => ({
|
|
26
26
|
name: "correct-ssr-public-path-plugin",
|
|
27
27
|
beforeInit(args) {
|
|
28
|
-
const { options } = args;
|
|
29
|
-
if (typeof window !== "undefined" || !
|
|
28
|
+
const { options, userOptions } = args;
|
|
29
|
+
if (typeof window !== "undefined" || !userOptions.version) {
|
|
30
30
|
return args;
|
|
31
31
|
}
|
|
32
32
|
if (typeof __webpack_require__ !== "undefined" && __webpack_require__.p) {
|
|
33
33
|
const publicPath = __webpack_require__.p;
|
|
34
34
|
const snapshot = (0, import_runtime_core.getGlobalSnapshotInfoByModuleInfo)({
|
|
35
|
-
version:
|
|
35
|
+
version: userOptions.version,
|
|
36
36
|
name: options.name
|
|
37
37
|
});
|
|
38
38
|
if (!snapshot || !("ssrRemoteEntry" in snapshot) || !snapshot.ssrRemoteEntry) {
|
|
@@ -3,14 +3,14 @@ var correctSsrPublicPathPlugin = function() {
|
|
|
3
3
|
return {
|
|
4
4
|
name: "correct-ssr-public-path-plugin",
|
|
5
5
|
beforeInit: function beforeInit(args) {
|
|
6
|
-
var options = args.options;
|
|
7
|
-
if (typeof window !== "undefined" || !
|
|
6
|
+
var options = args.options, userOptions = args.userOptions;
|
|
7
|
+
if (typeof window !== "undefined" || !userOptions.version) {
|
|
8
8
|
return args;
|
|
9
9
|
}
|
|
10
10
|
if (typeof __webpack_require__ !== "undefined" && __webpack_require__.p) {
|
|
11
11
|
var publicPath = __webpack_require__.p;
|
|
12
12
|
var snapshot = getGlobalSnapshotInfoByModuleInfo({
|
|
13
|
-
version:
|
|
13
|
+
version: userOptions.version,
|
|
14
14
|
name: options.name
|
|
15
15
|
});
|
|
16
16
|
if (!snapshot || !("ssrRemoteEntry" in snapshot) || !snapshot.ssrRemoteEntry) {
|
|
@@ -2,14 +2,14 @@ import { getGlobalSnapshotInfoByModuleInfo } from "@module-federation/enhanced/r
|
|
|
2
2
|
const correctSsrPublicPathPlugin = () => ({
|
|
3
3
|
name: "correct-ssr-public-path-plugin",
|
|
4
4
|
beforeInit(args) {
|
|
5
|
-
const { options } = args;
|
|
6
|
-
if (typeof window !== "undefined" || !
|
|
5
|
+
const { options, userOptions } = args;
|
|
6
|
+
if (typeof window !== "undefined" || !userOptions.version) {
|
|
7
7
|
return args;
|
|
8
8
|
}
|
|
9
9
|
if (typeof __webpack_require__ !== "undefined" && __webpack_require__.p) {
|
|
10
10
|
const publicPath = __webpack_require__.p;
|
|
11
11
|
const snapshot = getGlobalSnapshotInfoByModuleInfo({
|
|
12
|
-
version:
|
|
12
|
+
version: userOptions.version,
|
|
13
13
|
name: options.name
|
|
14
14
|
});
|
|
15
15
|
if (!snapshot || !("ssrRemoteEntry" in snapshot) || !snapshot.ssrRemoteEntry) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/modern-js",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250327064442",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
"@swc/helpers": "0.5.13",
|
|
98
98
|
"node-fetch": "~3.3.0",
|
|
99
99
|
"react-error-boundary": "4.1.2",
|
|
100
|
-
"@module-federation/rsbuild-plugin": "0.0.0-next-
|
|
101
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
102
|
-
"@module-federation/node": "0.0.0-next-
|
|
103
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
104
|
-
"@module-federation/cli": "0.0.0-next-
|
|
100
|
+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250327064442",
|
|
101
|
+
"@module-federation/enhanced": "0.0.0-next-20250327064442",
|
|
102
|
+
"@module-federation/node": "0.0.0-next-20250327064442",
|
|
103
|
+
"@module-federation/sdk": "0.0.0-next-20250327064442",
|
|
104
|
+
"@module-federation/cli": "0.0.0-next-20250327064442"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@modern-js/app-tools": "2.65.1",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@modern-js/module-tools": "2.65.1",
|
|
110
110
|
"@modern-js/runtime": "2.65.1",
|
|
111
111
|
"@modern-js/tsconfig": "2.65.1",
|
|
112
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
112
|
+
"@module-federation/manifest": "0.0.0-next-20250327064442"
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
115
|
"react": ">=17",
|