@module-federation/modern-js 0.0.0-next-20240725030707 → 0.0.0-next-20240725054734

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.
@@ -108,7 +108,8 @@ const moduleFederationConfigPlugin = (userConfig) => ({
108
108
  "@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
109
109
  },
110
110
  define: {
111
- FEDERATION_IPV4: JSON.stringify(ipv4)
111
+ FEDERATION_IPV4: JSON.stringify(ipv4),
112
+ REMOTE_IP_STRATEGY: JSON.stringify(userConfig.remoteIpStrategy)
112
113
  }
113
114
  },
114
115
  dev: {
@@ -23,7 +23,11 @@ __export(resolve_entry_ipv4_exports, {
23
23
  module.exports = __toCommonJS(resolve_entry_ipv4_exports);
24
24
  var import_constant = require("../../constant");
25
25
  const ipv4 = typeof FEDERATION_IPV4 !== "undefined" ? FEDERATION_IPV4 : "127.0.0.1";
26
+ const remoteIpStrategy = typeof REMOTE_IP_STRATEGY !== "undefined" ? REMOTE_IP_STRATEGY : "127.0.0.1";
26
27
  function replaceObjectLocalhost(key, obj) {
28
+ if (remoteIpStrategy !== "ipv4") {
29
+ return;
30
+ }
27
31
  if (!(key in obj)) {
28
32
  return;
29
33
  }
@@ -93,7 +93,8 @@ var moduleFederationConfigPlugin = function(userConfig) {
93
93
  "@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
94
94
  },
95
95
  define: {
96
- FEDERATION_IPV4: JSON.stringify(ipv4)
96
+ FEDERATION_IPV4: JSON.stringify(ipv4),
97
+ REMOTE_IP_STRATEGY: JSON.stringify(userConfig.remoteIpStrategy)
97
98
  }
98
99
  },
99
100
  dev: {
@@ -2,7 +2,11 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
3
3
  import { LOCALHOST } from "../../constant";
4
4
  var ipv4 = typeof FEDERATION_IPV4 !== "undefined" ? FEDERATION_IPV4 : "127.0.0.1";
5
+ var remoteIpStrategy = typeof REMOTE_IP_STRATEGY !== "undefined" ? REMOTE_IP_STRATEGY : "127.0.0.1";
5
6
  function replaceObjectLocalhost(key, obj) {
7
+ if (remoteIpStrategy !== "ipv4") {
8
+ return;
9
+ }
6
10
  if (!(key in obj)) {
7
11
  return;
8
12
  }
@@ -72,7 +72,8 @@ const moduleFederationConfigPlugin = (userConfig) => ({
72
72
  "@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
73
73
  },
74
74
  define: {
75
- FEDERATION_IPV4: JSON.stringify(ipv4)
75
+ FEDERATION_IPV4: JSON.stringify(ipv4),
76
+ REMOTE_IP_STRATEGY: JSON.stringify(userConfig.remoteIpStrategy)
76
77
  }
77
78
  },
78
79
  dev: {
@@ -1,6 +1,10 @@
1
1
  import { LOCALHOST } from "../../constant";
2
2
  const ipv4 = typeof FEDERATION_IPV4 !== "undefined" ? FEDERATION_IPV4 : "127.0.0.1";
3
+ const remoteIpStrategy = typeof REMOTE_IP_STRATEGY !== "undefined" ? REMOTE_IP_STRATEGY : "127.0.0.1";
3
4
  function replaceObjectLocalhost(key, obj) {
5
+ if (remoteIpStrategy !== "ipv4") {
6
+ return;
7
+ }
4
8
  if (!(key in obj)) {
5
9
  return;
6
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20240725030707",
3
+ "version": "0.0.0-next-20240725054734",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -61,9 +61,9 @@
61
61
  "node-fetch": "~3.3.0",
62
62
  "react-error-boundary": "4.0.13",
63
63
  "hoist-non-react-statics": "3.3.2",
64
- "@module-federation/sdk": "0.0.0-next-20240725030707",
65
- "@module-federation/enhanced": "0.0.0-next-20240725030707",
66
- "@module-federation/node": "0.0.0-next-20240725030707"
64
+ "@module-federation/sdk": "0.0.0-next-20240725054734",
65
+ "@module-federation/enhanced": "0.0.0-next-20240725054734",
66
+ "@module-federation/node": "0.0.0-next-20240725054734"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/hoist-non-react-statics": "3.3.2",
@@ -72,7 +72,7 @@
72
72
  "@modern-js/runtime": "2.56.2",
73
73
  "@modern-js/module-tools": "2.56.2",
74
74
  "@modern-js/tsconfig": "2.56.2",
75
- "@module-federation/manifest": "0.0.0-next-20240725030707"
75
+ "@module-federation/manifest": "0.0.0-next-20240725054734"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": ">=17",