@module-federation/modern-js 0.0.0-next-20250407023255 → 0.0.0-next-20250407031542

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.
@@ -38,7 +38,7 @@ const moduleFederationPlugin = (userConfig = {}) => {
38
38
  distOutputDir: "",
39
39
  originPluginOptions: userConfig,
40
40
  remoteIpStrategy: userConfig === null || userConfig === void 0 ? void 0 : userConfig.remoteIpStrategy,
41
- userConfig
41
+ userConfig: userConfig || {}
42
42
  };
43
43
  return {
44
44
  name: "@modern-js/plugin-module-federation",
@@ -78,7 +78,7 @@ const mfSSRRsbuildPlugin = (pluginOptions) => {
78
78
  if (ssrEnv !== utils.environment.name) {
79
79
  return config;
80
80
  }
81
- const userSSRConfig = pluginOptions.userConfig.ssr || {};
81
+ const userSSRConfig = pluginOptions.userConfig.ssr ? typeof pluginOptions.userConfig.ssr === "object" ? pluginOptions.userConfig.ssr : {} : {};
82
82
  config.output.publicPath = `${config.output.publicPath}${userSSRConfig.distOutputDir || import_path.default.relative(csrOutputPath, ssrOutputPath)}/`;
83
83
  return config;
84
84
  };
@@ -16,7 +16,7 @@ var moduleFederationPlugin = function() {
16
16
  distOutputDir: "",
17
17
  originPluginOptions: userConfig,
18
18
  remoteIpStrategy: userConfig === null || userConfig === void 0 ? void 0 : userConfig.remoteIpStrategy,
19
- userConfig
19
+ userConfig: userConfig || {}
20
20
  };
21
21
  return {
22
22
  name: "@modern-js/plugin-module-federation",
@@ -1,4 +1,5 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
+ import { _ as _type_of } from "@swc/helpers/_/_type_of";
2
3
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
3
4
  import path from "path";
4
5
  import { fs } from "@modern-js/utils";
@@ -45,7 +46,7 @@ var mfSSRRsbuildPlugin = function(pluginOptions) {
45
46
  if (ssrEnv !== utils.environment.name) {
46
47
  return config;
47
48
  }
48
- var userSSRConfig = pluginOptions.userConfig.ssr || {};
49
+ var userSSRConfig = pluginOptions.userConfig.ssr ? _type_of(pluginOptions.userConfig.ssr) === "object" ? pluginOptions.userConfig.ssr : {} : {};
49
50
  config.output.publicPath = "".concat(config.output.publicPath).concat(userSSRConfig.distOutputDir || path.relative(csrOutputPath, ssrOutputPath), "/");
50
51
  return config;
51
52
  };
@@ -12,7 +12,7 @@ const moduleFederationPlugin = (userConfig = {}) => {
12
12
  distOutputDir: "",
13
13
  originPluginOptions: userConfig,
14
14
  remoteIpStrategy: userConfig === null || userConfig === void 0 ? void 0 : userConfig.remoteIpStrategy,
15
- userConfig
15
+ userConfig: userConfig || {}
16
16
  };
17
17
  return {
18
18
  name: "@modern-js/plugin-module-federation",
@@ -42,7 +42,7 @@ const mfSSRRsbuildPlugin = (pluginOptions) => {
42
42
  if (ssrEnv !== utils.environment.name) {
43
43
  return config;
44
44
  }
45
- const userSSRConfig = pluginOptions.userConfig.ssr || {};
45
+ const userSSRConfig = pluginOptions.userConfig.ssr ? typeof pluginOptions.userConfig.ssr === "object" ? pluginOptions.userConfig.ssr : {} : {};
46
46
  config.output.publicPath = `${config.output.publicPath}${userSSRConfig.distOutputDir || path.relative(csrOutputPath, ssrOutputPath)}/`;
47
47
  return config;
48
48
  };
@@ -6,7 +6,7 @@ export interface PluginOptions {
6
6
  configPath?: string;
7
7
  ssr?: {
8
8
  distOutputDir?: string;
9
- } | false;
9
+ } | boolean;
10
10
  remoteIpStrategy?: 'ipv4' | 'inherit';
11
11
  }
12
12
  export interface InternalModernPluginOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20250407023255",
3
+ "version": "0.0.0-next-20250407031542",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -89,11 +89,11 @@
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.0.0-next-20250407023255",
93
- "@module-federation/enhanced": "0.0.0-next-20250407023255",
94
- "@module-federation/node": "0.0.0-next-20250407023255",
95
- "@module-federation/sdk": "0.0.0-next-20250407023255",
96
- "@module-federation/cli": "0.0.0-next-20250407023255"
92
+ "@module-federation/rsbuild-plugin": "0.0.0-next-20250407031542",
93
+ "@module-federation/enhanced": "0.0.0-next-20250407031542",
94
+ "@module-federation/node": "0.0.0-next-20250407031542",
95
+ "@module-federation/sdk": "0.0.0-next-20250407031542",
96
+ "@module-federation/cli": "0.0.0-next-20250407031542"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@rsbuild/core": "1.2.8",
@@ -102,7 +102,7 @@
102
102
  "@modern-js/module-tools": "2.65.1",
103
103
  "@modern-js/runtime": "2.65.1",
104
104
  "@modern-js/tsconfig": "2.65.1",
105
- "@module-federation/manifest": "0.0.0-next-20250407023255"
105
+ "@module-federation/manifest": "0.0.0-next-20250407031542"
106
106
  },
107
107
  "peerDependencies": {
108
108
  "react": ">=17",