@module-federation/modern-js 0.0.0-next-20250902054534 → 0.0.0-next-20250902071251
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.
|
@@ -40,6 +40,7 @@ __export(configPlugin_exports, {
|
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(configPlugin_exports);
|
|
42
42
|
var import_path = __toESM(require("path"));
|
|
43
|
+
var import_fs = __toESM(require("fs"));
|
|
43
44
|
var import_utils = require("./utils");
|
|
44
45
|
var import_sdk = require("@module-federation/sdk");
|
|
45
46
|
var import_node_bundle_require = require("@modern-js/node-bundle-require");
|
|
@@ -147,8 +148,9 @@ const patchMFConfig = (mfConfig, isServer, remoteIpStrategy, enableSSR) => {
|
|
|
147
148
|
...mfConfig.runtimePlugins || []
|
|
148
149
|
];
|
|
149
150
|
try {
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
const nodeModulesPath = import_path.default.resolve(process.cwd(), "node_modules");
|
|
152
|
+
const bridgeReactPath = import_path.default.join(nodeModulesPath, "@module-federation/bridge-react");
|
|
153
|
+
if (import_fs.default.existsSync(bridgeReactPath) && (!(mfConfig === null || mfConfig === void 0 ? void 0 : mfConfig.bridge) || !mfConfig.bridge.disableAlias)) {
|
|
152
154
|
mfConfig.bridge = {
|
|
153
155
|
disableAlias: true
|
|
154
156
|
};
|
|
@@ -5,6 +5,7 @@ import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
|
5
5
|
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
6
6
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
7
7
|
import path from "path";
|
|
8
|
+
import fs from "fs";
|
|
8
9
|
import { getIPV4, isWebTarget, skipByTarget } from "./utils";
|
|
9
10
|
import { encodeName } from "@module-federation/sdk";
|
|
10
11
|
import { bundle } from "@modern-js/node-bundle-require";
|
|
@@ -137,8 +138,9 @@ var patchMFConfig = function(mfConfig, isServer, remoteIpStrategy, enableSSR) {
|
|
|
137
138
|
}
|
|
138
139
|
var runtimePlugins = _to_consumable_array(mfConfig.runtimePlugins || []);
|
|
139
140
|
try {
|
|
140
|
-
var
|
|
141
|
-
|
|
141
|
+
var nodeModulesPath = path.resolve(process.cwd(), "node_modules");
|
|
142
|
+
var bridgeReactPath = path.join(nodeModulesPath, "@module-federation/bridge-react");
|
|
143
|
+
if (fs.existsSync(bridgeReactPath) && (!(mfConfig === null || mfConfig === void 0 ? void 0 : mfConfig.bridge) || !mfConfig.bridge.disableAlias)) {
|
|
142
144
|
mfConfig.bridge = {
|
|
143
145
|
disableAlias: true
|
|
144
146
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
2
3
|
import { getIPV4, isWebTarget, skipByTarget } from "./utils";
|
|
3
4
|
import { encodeName } from "@module-federation/sdk";
|
|
4
5
|
import { bundle } from "@modern-js/node-bundle-require";
|
|
@@ -106,8 +107,9 @@ const patchMFConfig = (mfConfig, isServer, remoteIpStrategy, enableSSR) => {
|
|
|
106
107
|
...mfConfig.runtimePlugins || []
|
|
107
108
|
];
|
|
108
109
|
try {
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
const nodeModulesPath = path.resolve(process.cwd(), "node_modules");
|
|
111
|
+
const bridgeReactPath = path.join(nodeModulesPath, "@module-federation/bridge-react");
|
|
112
|
+
if (fs.existsSync(bridgeReactPath) && (!(mfConfig === null || mfConfig === void 0 ? void 0 : mfConfig.bridge) || !mfConfig.bridge.disableAlias)) {
|
|
111
113
|
mfConfig.bridge = {
|
|
112
114
|
disableAlias: true
|
|
113
115
|
};
|
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-20250902071251",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
"@swc/helpers": "^0.5.17",
|
|
120
120
|
"node-fetch": "~3.3.0",
|
|
121
121
|
"react-error-boundary": "4.1.2",
|
|
122
|
-
"@module-federation/rsbuild-plugin": "0.0.0-next-
|
|
123
|
-
"@module-federation/bridge-react": "0.0.0-next-
|
|
124
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
125
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
126
|
-
"@module-federation/node": "0.0.0-next-
|
|
127
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
128
|
-
"@module-federation/cli": "0.0.0-next-
|
|
122
|
+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250902071251",
|
|
123
|
+
"@module-federation/bridge-react": "0.0.0-next-20250902071251",
|
|
124
|
+
"@module-federation/enhanced": "0.0.0-next-20250902071251",
|
|
125
|
+
"@module-federation/runtime": "0.0.0-next-20250902071251",
|
|
126
|
+
"@module-federation/node": "0.0.0-next-20250902071251",
|
|
127
|
+
"@module-federation/sdk": "0.0.0-next-20250902071251",
|
|
128
|
+
"@module-federation/cli": "0.0.0-next-20250902071251"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
131
|
"@modern-js/core": "2.68.2",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@modern-js/tsconfig": "2.68.2",
|
|
138
138
|
"@types/react": "^18.3.11",
|
|
139
139
|
"@types/react-dom": "^18.3.0",
|
|
140
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
140
|
+
"@module-federation/manifest": "0.0.0-next-20250902071251"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
|
143
143
|
"react": ">=17",
|