@module-federation/modern-js 0.8.11 → 0.8.12

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.
@@ -52,11 +52,11 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
52
52
  "@modern-js/plugin-module-federation"
53
53
  ],
54
54
  setup: async (api) => {
55
- var _modernjsConfig_server, _pluginOptions_userConfig;
55
+ var _pluginOptions_userConfig, _modernjsConfig_server;
56
56
  const modernjsConfig = api.getConfig();
57
- const enableSSR = Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
58
- if (!enableSSR || ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false) {
59
- return {};
57
+ const enableSSR = ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false ? false : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
58
+ if (!enableSSR) {
59
+ return;
60
60
  }
61
61
  setEnv();
62
62
  api._internalRuntimePlugins(({ entrypoint, plugins }) => {
@@ -21,14 +21,13 @@ var moduleFederationSSRPlugin = function(pluginOptions) {
21
21
  ],
22
22
  setup: function() {
23
23
  var _ref = _async_to_generator(function(api) {
24
- var _modernjsConfig_server, _pluginOptions_userConfig, modernjsConfig, enableSSR;
24
+ var _pluginOptions_userConfig, _modernjsConfig_server, modernjsConfig, enableSSR;
25
25
  return _ts_generator(this, function(_state) {
26
26
  modernjsConfig = api.getConfig();
27
- enableSSR = Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
28
- if (!enableSSR || ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false) {
27
+ enableSSR = ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false ? false : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
28
+ if (!enableSSR) {
29
29
  return [
30
- 2,
31
- {}
30
+ 2
32
31
  ];
33
32
  }
34
33
  setEnv();
@@ -17,11 +17,11 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
17
17
  "@modern-js/plugin-module-federation"
18
18
  ],
19
19
  setup: async (api) => {
20
- var _modernjsConfig_server, _pluginOptions_userConfig;
20
+ var _pluginOptions_userConfig, _modernjsConfig_server;
21
21
  const modernjsConfig = api.getConfig();
22
- const enableSSR = Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
23
- if (!enableSSR || ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false) {
24
- return {};
22
+ const enableSSR = ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false ? false : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
23
+ if (!enableSSR) {
24
+ return;
25
25
  }
26
26
  setEnv();
27
27
  api._internalRuntimePlugins(({ entrypoint, plugins }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.8.11",
3
+ "version": "0.8.12",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -89,10 +89,10 @@
89
89
  "@swc/helpers": "0.5.13",
90
90
  "node-fetch": "~3.3.0",
91
91
  "react-error-boundary": "4.1.2",
92
- "@module-federation/rsbuild-plugin": "0.8.11",
93
- "@module-federation/enhanced": "0.8.11",
94
- "@module-federation/node": "2.6.24",
95
- "@module-federation/sdk": "0.8.11"
92
+ "@module-federation/rsbuild-plugin": "0.8.12",
93
+ "@module-federation/enhanced": "0.8.12",
94
+ "@module-federation/node": "2.6.25",
95
+ "@module-federation/sdk": "0.8.12"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@modern-js/app-tools": "2.64.0",
@@ -100,7 +100,7 @@
100
100
  "@modern-js/module-tools": "2.64.0",
101
101
  "@modern-js/runtime": "2.64.0",
102
102
  "@modern-js/tsconfig": "2.64.0",
103
- "@module-federation/manifest": "0.8.11"
103
+ "@module-federation/manifest": "0.8.12"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": ">=17",