@module-federation/modern-js 0.0.0-next-20250714095646 → 0.0.0-next-20250715082703
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.
- package/dist/cjs/cli/configPlugin.js +4 -2
- package/dist/cjs/cli/configPlugin.spec.js +1 -2
- package/dist/esm/cli/configPlugin.js +4 -2
- package/dist/esm/cli/configPlugin.spec.js +1 -2
- package/dist/esm-node/cli/configPlugin.js +4 -2
- package/dist/esm-node/cli/configPlugin.spec.js +1 -2
- package/dist/types/cli/index.d.ts +1 -1
- package/dist/types/cli/mfRuntimePlugins/inject-node-fetch.d.ts +2 -2
- package/dist/types/cli/mfRuntimePlugins/resolve-entry-ipv4.d.ts +2 -2
- package/dist/types/cli/mfRuntimePlugins/shared-strategy.d.ts +2 -2
- package/package.json +17 -24
- package/dist/cjs/runtime/plugin.js +0 -43
- package/dist/esm/runtime/plugin.js +0 -19
- package/dist/esm-node/runtime/plugin.js +0 -19
- package/dist/types/runtime/plugin.d.ts +0 -2
|
@@ -351,11 +351,13 @@ const moduleFederationConfigPlugin = (userConfig) => ({
|
|
|
351
351
|
headers: corsHeaders
|
|
352
352
|
}
|
|
353
353
|
},
|
|
354
|
-
|
|
354
|
+
resolve: {
|
|
355
355
|
alias: {
|
|
356
356
|
// TODO: deprecated
|
|
357
357
|
"@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
|
|
358
|
-
}
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
source: {
|
|
359
361
|
define: defineConfig,
|
|
360
362
|
enableAsyncEntry: bundlerType === "rspack" ? (_modernjsConfig_source_enableAsyncEntry = (_modernjsConfig_source = modernjsConfig.source) === null || _modernjsConfig_source === void 0 ? void 0 : _modernjsConfig_source.enableAsyncEntry) !== null && _modernjsConfig_source_enableAsyncEntry !== void 0 ? _modernjsConfig_source_enableAsyncEntry : true : (_modernjsConfig_source1 = modernjsConfig.source) === null || _modernjsConfig_source1 === void 0 ? void 0 : _modernjsConfig_source1.enableAsyncEntry
|
|
361
363
|
},
|
|
@@ -88,8 +88,7 @@ const mfConfig = {
|
|
|
88
88
|
},
|
|
89
89
|
remoteType: "script",
|
|
90
90
|
runtimePlugins: [
|
|
91
|
-
require.resolve("@module-federation/modern-js/shared-strategy")
|
|
92
|
-
require.resolve("@module-federation/bridge-react/lazy-load-component-plugin")
|
|
91
|
+
require.resolve("@module-federation/modern-js/shared-strategy")
|
|
93
92
|
],
|
|
94
93
|
shared: {
|
|
95
94
|
react: {
|
|
@@ -348,11 +348,13 @@ var moduleFederationConfigPlugin = function(userConfig) {
|
|
|
348
348
|
headers: corsHeaders
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
|
-
|
|
351
|
+
resolve: {
|
|
352
352
|
alias: {
|
|
353
353
|
// TODO: deprecated
|
|
354
354
|
"@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
|
|
355
|
-
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
source: {
|
|
356
358
|
define: defineConfig,
|
|
357
359
|
enableAsyncEntry: bundlerType === "rspack" ? (_modernjsConfig_source_enableAsyncEntry = (_modernjsConfig_source = modernjsConfig.source) === null || _modernjsConfig_source === void 0 ? void 0 : _modernjsConfig_source.enableAsyncEntry) !== null && _modernjsConfig_source_enableAsyncEntry !== void 0 ? _modernjsConfig_source_enableAsyncEntry : true : (_modernjsConfig_source1 = modernjsConfig.source) === null || _modernjsConfig_source1 === void 0 ? void 0 : _modernjsConfig_source1.enableAsyncEntry
|
|
358
360
|
},
|
|
@@ -76,8 +76,7 @@ describe("patchMFConfig", /* @__PURE__ */ _async_to_generator(function() {
|
|
|
76
76
|
},
|
|
77
77
|
remoteType: "script",
|
|
78
78
|
runtimePlugins: [
|
|
79
|
-
require.resolve("@module-federation/modern-js/shared-strategy")
|
|
80
|
-
require.resolve("@module-federation/bridge-react/lazy-load-component-plugin")
|
|
79
|
+
require.resolve("@module-federation/modern-js/shared-strategy")
|
|
81
80
|
],
|
|
82
81
|
shared: {
|
|
83
82
|
react: {
|
|
@@ -310,11 +310,13 @@ const moduleFederationConfigPlugin = (userConfig) => ({
|
|
|
310
310
|
headers: corsHeaders
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
|
-
|
|
313
|
+
resolve: {
|
|
314
314
|
alias: {
|
|
315
315
|
// TODO: deprecated
|
|
316
316
|
"@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
|
|
317
|
-
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
source: {
|
|
318
320
|
define: defineConfig,
|
|
319
321
|
enableAsyncEntry: bundlerType === "rspack" ? (_modernjsConfig_source_enableAsyncEntry = (_modernjsConfig_source = modernjsConfig.source) === null || _modernjsConfig_source === void 0 ? void 0 : _modernjsConfig_source.enableAsyncEntry) !== null && _modernjsConfig_source_enableAsyncEntry !== void 0 ? _modernjsConfig_source_enableAsyncEntry : true : (_modernjsConfig_source1 = modernjsConfig.source) === null || _modernjsConfig_source1 === void 0 ? void 0 : _modernjsConfig_source1.enableAsyncEntry
|
|
320
322
|
},
|
|
@@ -65,8 +65,7 @@ describe("patchMFConfig", async () => {
|
|
|
65
65
|
},
|
|
66
66
|
remoteType: "script",
|
|
67
67
|
runtimePlugins: [
|
|
68
|
-
require.resolve("@module-federation/modern-js/shared-strategy")
|
|
69
|
-
require.resolve("@module-federation/bridge-react/lazy-load-component-plugin")
|
|
68
|
+
require.resolve("@module-federation/modern-js/shared-strategy")
|
|
70
69
|
],
|
|
71
70
|
shared: {
|
|
72
71
|
react: {
|
|
@@ -3,4 +3,4 @@ import type { PluginOptions } from '../types';
|
|
|
3
3
|
export declare const moduleFederationPlugin: (userConfig?: PluginOptions) => CliPluginFuture<AppTools>;
|
|
4
4
|
export default moduleFederationPlugin;
|
|
5
5
|
export { createModuleFederationConfig } from '@module-federation/enhanced';
|
|
6
|
-
export type {
|
|
6
|
+
export type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const injectNodeFetchPlugin: () =>
|
|
1
|
+
import type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
|
|
2
|
+
declare const injectNodeFetchPlugin: () => ModuleFederationRuntimePlugin;
|
|
3
3
|
export default injectNodeFetchPlugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const resolveEntryIpv4Plugin: () =>
|
|
1
|
+
import type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
|
|
2
|
+
declare const resolveEntryIpv4Plugin: () => ModuleFederationRuntimePlugin;
|
|
3
3
|
export default resolveEntryIpv4Plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const sharedStrategy: () =>
|
|
1
|
+
import type { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
|
|
2
|
+
declare const sharedStrategy: () => ModuleFederationRuntimePlugin;
|
|
3
3
|
export default sharedStrategy;
|
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-20250715082703",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
"types": "./dist/types/runtime/index.d.ts",
|
|
25
25
|
"default": "./dist/esm/runtime/index.js"
|
|
26
26
|
},
|
|
27
|
-
"./runtime-plugin": {
|
|
28
|
-
"types": "./dist/types/runtime/plugin.d.ts",
|
|
29
|
-
"default": "./dist/esm/runtime/plugin.js"
|
|
30
|
-
},
|
|
31
27
|
"./react": {
|
|
32
28
|
"types": "./dist/types/react/index.d.ts",
|
|
33
29
|
"default": "./dist/esm/react/index.js"
|
|
@@ -82,9 +78,6 @@
|
|
|
82
78
|
"runtime": [
|
|
83
79
|
"./dist/types/runtime/index.d.ts"
|
|
84
80
|
],
|
|
85
|
-
"runtime-plugin": [
|
|
86
|
-
"./dist/types/runtime/plugin.d.ts"
|
|
87
|
-
],
|
|
88
81
|
"react": [
|
|
89
82
|
"./dist/types/react/index.d.ts"
|
|
90
83
|
],
|
|
@@ -119,30 +112,30 @@
|
|
|
119
112
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
120
113
|
"license": "MIT",
|
|
121
114
|
"dependencies": {
|
|
122
|
-
"@modern-js/utils": "2.
|
|
123
|
-
"@modern-js/node-bundle-require": "2.
|
|
115
|
+
"@modern-js/utils": "2.68.2",
|
|
116
|
+
"@modern-js/node-bundle-require": "2.68.2",
|
|
124
117
|
"fs-extra": "11.3.0",
|
|
125
118
|
"lru-cache": "10.4.3",
|
|
126
119
|
"@swc/helpers": "^0.5.17",
|
|
127
120
|
"node-fetch": "~3.3.0",
|
|
128
121
|
"react-error-boundary": "4.1.2",
|
|
129
|
-
"@module-federation/rsbuild-plugin": "0.0.0-next-
|
|
130
|
-
"@module-federation/bridge-react": "0.0.0-next-
|
|
131
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
132
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
133
|
-
"@module-federation/node": "0.0.0-next-
|
|
134
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
135
|
-
"@module-federation/cli": "0.0.0-next-
|
|
122
|
+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250715082703",
|
|
123
|
+
"@module-federation/bridge-react": "0.0.0-next-20250715082703",
|
|
124
|
+
"@module-federation/enhanced": "0.0.0-next-20250715082703",
|
|
125
|
+
"@module-federation/runtime": "0.0.0-next-20250715082703",
|
|
126
|
+
"@module-federation/node": "0.0.0-next-20250715082703",
|
|
127
|
+
"@module-federation/sdk": "0.0.0-next-20250715082703",
|
|
128
|
+
"@module-federation/cli": "0.0.0-next-20250715082703"
|
|
136
129
|
},
|
|
137
130
|
"devDependencies": {
|
|
138
|
-
"@modern-js/core": "2.
|
|
131
|
+
"@modern-js/core": "2.68.2",
|
|
139
132
|
"@rsbuild/core": "1.3.21",
|
|
140
|
-
"@modern-js/app-tools": "2.
|
|
141
|
-
"@modern-js/server-runtime": "2.
|
|
142
|
-
"@modern-js/module-tools": "2.
|
|
143
|
-
"@modern-js/runtime": "2.
|
|
144
|
-
"@modern-js/tsconfig": "2.
|
|
145
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
133
|
+
"@modern-js/app-tools": "2.68.2",
|
|
134
|
+
"@modern-js/server-runtime": "2.68.2",
|
|
135
|
+
"@modern-js/module-tools": "2.68.2",
|
|
136
|
+
"@modern-js/runtime": "2.68.2",
|
|
137
|
+
"@modern-js/tsconfig": "2.68.2",
|
|
138
|
+
"@module-federation/manifest": "0.0.0-next-20250715082703"
|
|
146
139
|
},
|
|
147
140
|
"peerDependencies": {
|
|
148
141
|
"react": ">=17",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var plugin_exports = {};
|
|
20
|
-
__export(plugin_exports, {
|
|
21
|
-
mfPlugin: () => mfPlugin
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(plugin_exports);
|
|
24
|
-
var import_runtime = require("@module-federation/enhanced/runtime");
|
|
25
|
-
var import_bridge_react = require("@module-federation/bridge-react");
|
|
26
|
-
const mfPlugin = () => {
|
|
27
|
-
return {
|
|
28
|
-
name: "@modern-js/plugin-mf",
|
|
29
|
-
setup: (api) => {
|
|
30
|
-
api.wrapRoot((App) => {
|
|
31
|
-
var _getInstance;
|
|
32
|
-
(_getInstance = (0, import_runtime.getInstance)()) === null || _getInstance === void 0 ? void 0 : _getInstance.registerPlugins([
|
|
33
|
-
(0, import_bridge_react.lazyLoadComponentPlugin)()
|
|
34
|
-
]);
|
|
35
|
-
return App;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
mfPlugin
|
|
43
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getInstance } from "@module-federation/enhanced/runtime";
|
|
2
|
-
import { lazyLoadComponentPlugin } from "@module-federation/bridge-react";
|
|
3
|
-
var mfPlugin = function() {
|
|
4
|
-
return {
|
|
5
|
-
name: "@modern-js/plugin-mf",
|
|
6
|
-
setup: function(api) {
|
|
7
|
-
api.wrapRoot(function(App) {
|
|
8
|
-
var _getInstance;
|
|
9
|
-
(_getInstance = getInstance()) === null || _getInstance === void 0 ? void 0 : _getInstance.registerPlugins([
|
|
10
|
-
lazyLoadComponentPlugin()
|
|
11
|
-
]);
|
|
12
|
-
return App;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
mfPlugin
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getInstance } from "@module-federation/enhanced/runtime";
|
|
2
|
-
import { lazyLoadComponentPlugin } from "@module-federation/bridge-react";
|
|
3
|
-
const mfPlugin = () => {
|
|
4
|
-
return {
|
|
5
|
-
name: "@modern-js/plugin-mf",
|
|
6
|
-
setup: (api) => {
|
|
7
|
-
api.wrapRoot((App) => {
|
|
8
|
-
var _getInstance;
|
|
9
|
-
(_getInstance = getInstance()) === null || _getInstance === void 0 ? void 0 : _getInstance.registerPlugins([
|
|
10
|
-
lazyLoadComponentPlugin()
|
|
11
|
-
]);
|
|
12
|
-
return App;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
mfPlugin
|
|
19
|
-
};
|