@module-federation/modern-js 0.0.0-next-20240918073359 → 0.0.0-next-20240919023345
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.
|
@@ -31,6 +31,9 @@ __export(plugin_exports, {
|
|
|
31
31
|
mfSSRPlugin: () => mfSSRPlugin
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(plugin_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_hoist_non_react_statics = __toESM(require("hoist-non-react-statics"));
|
|
36
|
+
var import_SSRLiveReload = require("./SSRLiveReload");
|
|
34
37
|
console.log("mfSSRPlugin trigger");
|
|
35
38
|
const mfSSRPlugin = ({ metaName }) => ({
|
|
36
39
|
name: "@module-federation/modern-js",
|
|
@@ -53,6 +56,18 @@ const mfSSRPlugin = ({ metaName }) => ({
|
|
|
53
56
|
globalThis.shouldUpdate = true;
|
|
54
57
|
}
|
|
55
58
|
return;
|
|
59
|
+
},
|
|
60
|
+
wrapRoot(App) {
|
|
61
|
+
console.log("live reload wrapRoot");
|
|
62
|
+
const AppWrapper = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SSRLiveReload.SSRLiveReload, {}),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
|
66
|
+
...props
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
return (0, import_hoist_non_react_statics.default)(AppWrapper, App);
|
|
56
71
|
}
|
|
57
72
|
};
|
|
58
73
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
2
|
+
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
6
|
+
import { SSRLiveReload } from "./SSRLiveReload";
|
|
3
7
|
console.log("mfSSRPlugin trigger");
|
|
4
8
|
var mfSSRPlugin = function(param) {
|
|
5
9
|
var metaName = param.metaName;
|
|
@@ -56,6 +60,18 @@ var mfSSRPlugin = function(param) {
|
|
|
56
60
|
}
|
|
57
61
|
});
|
|
58
62
|
})();
|
|
63
|
+
},
|
|
64
|
+
wrapRoot: function wrapRoot(App) {
|
|
65
|
+
console.log("live reload wrapRoot");
|
|
66
|
+
var AppWrapper = function(props) {
|
|
67
|
+
return /* @__PURE__ */ _jsxs(_Fragment, {
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ _jsx(SSRLiveReload, {}),
|
|
70
|
+
/* @__PURE__ */ _jsx(App, _object_spread({}, props))
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
return hoistNonReactStatics(AppWrapper, App);
|
|
59
75
|
}
|
|
60
76
|
};
|
|
61
77
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
3
|
+
import { SSRLiveReload } from "./SSRLiveReload";
|
|
1
4
|
console.log("mfSSRPlugin trigger");
|
|
2
5
|
const mfSSRPlugin = ({ metaName }) => ({
|
|
3
6
|
name: "@module-federation/modern-js",
|
|
@@ -20,6 +23,18 @@ const mfSSRPlugin = ({ metaName }) => ({
|
|
|
20
23
|
globalThis.shouldUpdate = true;
|
|
21
24
|
}
|
|
22
25
|
return;
|
|
26
|
+
},
|
|
27
|
+
wrapRoot(App) {
|
|
28
|
+
console.log("live reload wrapRoot");
|
|
29
|
+
const AppWrapper = (props) => /* @__PURE__ */ _jsxs(_Fragment, {
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ _jsx(SSRLiveReload, {}),
|
|
32
|
+
/* @__PURE__ */ _jsx(App, {
|
|
33
|
+
...props
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
return hoistNonReactStatics(AppWrapper, App);
|
|
23
38
|
}
|
|
24
39
|
};
|
|
25
40
|
}
|
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-20240919023345",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
"@babel/parser": "7.25.3",
|
|
95
95
|
"@babel/traverse": "7.25.3",
|
|
96
96
|
"@babel/types": "7.25.2",
|
|
97
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
98
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
99
|
-
"@module-federation/node": "0.0.0-next-
|
|
97
|
+
"@module-federation/sdk": "0.0.0-next-20240919023345",
|
|
98
|
+
"@module-federation/enhanced": "0.0.0-next-20240919023345",
|
|
99
|
+
"@module-federation/node": "0.0.0-next-20240919023345"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/babel__traverse": "7.20.6",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@modern-js/runtime": "^2.59.0",
|
|
109
109
|
"@modern-js/module-tools": "^2.59.0",
|
|
110
110
|
"@modern-js/tsconfig": "^2.59.0",
|
|
111
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
111
|
+
"@module-federation/manifest": "0.0.0-next-20240919023345"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"@modern-js/runtime": "^2.59.0",
|