@module-federation/modern-js 0.0.0-next-20250401063000 → 0.0.0-next-20250402032411

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.
@@ -1,25 +1,29 @@
1
1
  import path from "path";
2
2
  import { fs } from "@modern-js/utils";
3
- function mergeStats(browserStats, nodeStats, ssrDir) {
3
+ function mergeStats(browserStats, nodeStats, ssrPublicPath) {
4
4
  const ssrRemoteEntry = nodeStats.metaData.remoteEntry;
5
- ssrRemoteEntry.path = ssrDir;
6
5
  browserStats.metaData.ssrRemoteEntry = ssrRemoteEntry;
6
+ if ("publicPath" in browserStats.metaData) {
7
+ browserStats.metaData.ssrPublicPath = ssrPublicPath;
8
+ }
7
9
  return browserStats;
8
10
  }
9
- function mergeManifest(browserManifest, nodeManifest, ssrDir) {
11
+ function mergeManifest(browserManifest, nodeManifest, ssrPublicPath) {
10
12
  const ssrRemoteEntry = nodeManifest.metaData.remoteEntry;
11
- ssrRemoteEntry.path = ssrDir;
12
13
  browserManifest.metaData.ssrRemoteEntry = ssrRemoteEntry;
14
+ if ("publicPath" in browserManifest.metaData) {
15
+ browserManifest.metaData.ssrPublicPath = ssrPublicPath;
16
+ }
13
17
  return browserManifest;
14
18
  }
15
- function mergeStatsAndManifest(nodePlugin, browserPlugin, ssrDir) {
19
+ function mergeStatsAndManifest(nodePlugin, browserPlugin, ssrPublicPath) {
16
20
  const nodeResourceInfo = nodePlugin.statsResourceInfo;
17
21
  const browserResourceInfo = browserPlugin.statsResourceInfo;
18
22
  if (!browserResourceInfo || !nodeResourceInfo || !browserResourceInfo.stats || !nodeResourceInfo.stats || !browserResourceInfo.manifest || !nodeResourceInfo.manifest) {
19
23
  throw new Error("can not get browserResourceInfo or nodeResourceInfo");
20
24
  }
21
- const mergedStats = mergeStats(browserResourceInfo.stats.stats, nodeResourceInfo.stats.stats, ssrDir);
22
- const mergedManifest = mergeManifest(browserResourceInfo.manifest.manifest, nodeResourceInfo.manifest.manifest, ssrDir);
25
+ const mergedStats = mergeStats(browserResourceInfo.stats.stats, nodeResourceInfo.stats.stats, ssrPublicPath);
26
+ const mergedManifest = mergeManifest(browserResourceInfo.manifest.manifest, nodeResourceInfo.manifest.manifest, ssrPublicPath);
23
27
  return {
24
28
  mergedStats,
25
29
  mergedStatsFilePath: browserResourceInfo.stats.filename,
@@ -27,8 +31,8 @@ function mergeStatsAndManifest(nodePlugin, browserPlugin, ssrDir) {
27
31
  mergedManifestFilePath: browserResourceInfo.manifest.filename
28
32
  };
29
33
  }
30
- function updateStatsAndManifest(nodePlugin, browserPlugin, outputDir, ssrDir) {
31
- const { mergedStats, mergedStatsFilePath, mergedManifest, mergedManifestFilePath } = mergeStatsAndManifest(nodePlugin, browserPlugin, ssrDir);
34
+ function updateStatsAndManifest(nodePlugin, browserPlugin, outputDir, ssrPublicPath) {
35
+ const { mergedStats, mergedStatsFilePath, mergedManifest, mergedManifestFilePath } = mergeStatsAndManifest(nodePlugin, browserPlugin, ssrPublicPath);
32
36
  fs.writeFileSync(path.resolve(outputDir, mergedStatsFilePath), JSON.stringify(mergedStats, null, 2));
33
37
  fs.writeFileSync(path.resolve(outputDir, mergedManifestFilePath), JSON.stringify(mergedManifest, null, 2));
34
38
  }
@@ -5,7 +5,6 @@ import { ModuleFederationPlugin as RspackModuleFederationPlugin } from "@module-
5
5
  import UniverseEntryChunkTrackerPlugin from "@module-federation/node/universe-entry-chunk-tracker-plugin";
6
6
  import { updateStatsAndManifest } from "./manifest";
7
7
  import { isDev } from "./constant";
8
- import { MODERN_JS_SERVER_DIR } from "../constant";
9
8
  import logger from "./logger";
10
9
  import { isWebTarget, skipByTarget } from "./utils";
11
10
  function setEnv() {
@@ -13,6 +12,52 @@ function setEnv() {
13
12
  process.env["MF_SSR_PRJ"] = "true";
14
13
  }
15
14
  const CHAIN_MF_PLUGIN_ID = "plugin-module-federation-server";
15
+ let ssrPublicPath = "";
16
+ const mfSSRRsbuildPlugin = (pluginOptions) => {
17
+ return {
18
+ name: "@modern-js/plugin-mf-post-config",
19
+ pre: [
20
+ "@modern-js/builder-plugin-ssr"
21
+ ],
22
+ setup(api) {
23
+ if (pluginOptions.csrConfig.getPublicPath) {
24
+ return;
25
+ }
26
+ let csrOutputPath = "";
27
+ let ssrOutputPath = "";
28
+ let ssrEnv = "";
29
+ api.modifyEnvironmentConfig((config, { name }) => {
30
+ const target = config.output.target;
31
+ if (skipByTarget(target)) {
32
+ return config;
33
+ }
34
+ if (isWebTarget(target)) {
35
+ csrOutputPath = config.output.distPath.root;
36
+ } else {
37
+ ssrOutputPath = config.output.distPath.root;
38
+ ssrEnv = name;
39
+ }
40
+ return config;
41
+ });
42
+ const modifySSRPublicPath = (config, utils) => {
43
+ if (ssrEnv !== utils.environment.name) {
44
+ return config;
45
+ }
46
+ ssrPublicPath = `${config.output.publicPath}${path.relative(csrOutputPath, ssrOutputPath)}/`;
47
+ config.output.publicPath = ssrPublicPath;
48
+ return config;
49
+ };
50
+ api.modifyWebpackConfig((config, utils) => {
51
+ modifySSRPublicPath(config, utils);
52
+ return config;
53
+ });
54
+ api.modifyRspackConfig((config, utils) => {
55
+ modifySSRPublicPath(config, utils);
56
+ return config;
57
+ });
58
+ }
59
+ };
60
+ };
16
61
  const moduleFederationSSRPlugin = (pluginOptions) => ({
17
62
  name: "@modern-js/plugin-module-federation-ssr",
18
63
  pre: [
@@ -24,8 +69,6 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
24
69
  const modernjsConfig = api.getConfig();
25
70
  var _pluginOptions_userConfig_ssr;
26
71
  const enableSSR = (_pluginOptions_userConfig_ssr = (_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) !== null && _pluginOptions_userConfig_ssr !== void 0 ? _pluginOptions_userConfig_ssr : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
27
- let csrOutputPath = "";
28
- let ssrOutputPath = "";
29
72
  if (!enableSSR) {
30
73
  return;
31
74
  }
@@ -76,14 +119,12 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
76
119
  "@module-federation/node/utils": "NOT_USED_IN_BROWSER"
77
120
  });
78
121
  }
79
- if (!isWeb) {
80
- ssrOutputPath = chain.output.get("path") || path.resolve(process.cwd(), `dist/${MODERN_JS_SERVER_DIR}`);
81
- } else {
82
- csrOutputPath = chain.output.get("path") || path.resolve(process.cwd(), "dist");
83
- }
84
122
  });
85
123
  api.config(() => {
86
124
  return {
125
+ builderPlugins: [
126
+ mfSSRRsbuildPlugin(pluginOptions)
127
+ ],
87
128
  tools: {
88
129
  devServer: {
89
130
  before: [
@@ -116,11 +157,11 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
116
157
  });
117
158
  api.onAfterBuild(() => {
118
159
  const { nodePlugin, browserPlugin, distOutputDir } = pluginOptions;
119
- updateStatsAndManifest(nodePlugin, browserPlugin, distOutputDir, path.relative(csrOutputPath, ssrOutputPath));
160
+ updateStatsAndManifest(nodePlugin, browserPlugin, distOutputDir, ssrPublicPath);
120
161
  });
121
162
  api.onDevCompileDone(() => {
122
163
  const { nodePlugin, browserPlugin, distOutputDir } = pluginOptions;
123
- updateStatsAndManifest(nodePlugin, browserPlugin, distOutputDir, path.relative(csrOutputPath, ssrOutputPath));
164
+ updateStatsAndManifest(nodePlugin, browserPlugin, distOutputDir, ssrPublicPath);
124
165
  });
125
166
  }
126
167
  });
@@ -1,231 +1,4 @@
1
1
  import os from "os";
2
- import path from "path";
3
- import { encodeName } from "@module-federation/sdk";
4
- import { bundle } from "@modern-js/node-bundle-require";
5
- import { LOCALHOST, PLUGIN_IDENTIFIER } from "../constant";
6
- import logger from "./logger";
7
- import { autoDeleteSplitChunkCacheGroups } from "@module-federation/rsbuild-plugin/utils";
8
- const defaultPath = path.resolve(process.cwd(), "module-federation.config.ts");
9
- const isDev = process.env.NODE_ENV === "development";
10
- const getMFConfig = async (userConfig) => {
11
- const { config, configPath } = userConfig;
12
- if (config) {
13
- return config;
14
- }
15
- const mfConfigPath = configPath ? configPath : defaultPath;
16
- const preBundlePath = await bundle(mfConfigPath);
17
- const mfConfig = (await import(preBundlePath)).default;
18
- return mfConfig;
19
- };
20
- const injectRuntimePlugins = (runtimePlugin, runtimePlugins) => {
21
- if (!runtimePlugins.includes(runtimePlugin)) {
22
- runtimePlugins.push(runtimePlugin);
23
- }
24
- };
25
- const replaceRemoteUrl = (mfConfig, remoteIpStrategy) => {
26
- if (remoteIpStrategy && remoteIpStrategy === "inherit") {
27
- return;
28
- }
29
- if (!mfConfig.remotes) {
30
- return;
31
- }
32
- const ipv4 = getIPV4();
33
- const handleRemoteObject = (remoteObject) => {
34
- Object.keys(remoteObject).forEach((remoteKey) => {
35
- const remote = remoteObject[remoteKey];
36
- if (Array.isArray(remote)) {
37
- return;
38
- }
39
- if (typeof remote === "string" && remote.includes(LOCALHOST)) {
40
- remoteObject[remoteKey] = remote.replace(LOCALHOST, ipv4);
41
- }
42
- if (typeof remote === "object" && !Array.isArray(remote.external) && remote.external.includes(LOCALHOST)) {
43
- remote.external = remote.external.replace(LOCALHOST, ipv4);
44
- }
45
- });
46
- };
47
- if (Array.isArray(mfConfig.remotes)) {
48
- mfConfig.remotes.forEach((remoteObject) => {
49
- if (typeof remoteObject === "string") {
50
- return;
51
- }
52
- handleRemoteObject(remoteObject);
53
- });
54
- } else if (typeof mfConfig.remotes !== "string") {
55
- handleRemoteObject(mfConfig.remotes);
56
- }
57
- };
58
- const patchDTSConfig = (mfConfig, isServer) => {
59
- if (isServer) {
60
- return;
61
- }
62
- const ModernJSRuntime = "@modern-js/runtime/mf";
63
- if (mfConfig.dts !== false) {
64
- var _mfConfig_dts, _mfConfig_dts1;
65
- if (typeof mfConfig.dts === "boolean" || mfConfig.dts === void 0) {
66
- mfConfig.dts = {
67
- consumeTypes: {
68
- runtimePkgs: [
69
- ModernJSRuntime
70
- ]
71
- }
72
- };
73
- } else if (((_mfConfig_dts = mfConfig.dts) === null || _mfConfig_dts === void 0 ? void 0 : _mfConfig_dts.consumeTypes) || ((_mfConfig_dts1 = mfConfig.dts) === null || _mfConfig_dts1 === void 0 ? void 0 : _mfConfig_dts1.consumeTypes) === void 0) {
74
- var _mfConfig_dts2;
75
- if (typeof mfConfig.dts.consumeTypes === "boolean" || ((_mfConfig_dts2 = mfConfig.dts) === null || _mfConfig_dts2 === void 0 ? void 0 : _mfConfig_dts2.consumeTypes) === void 0) {
76
- mfConfig.dts.consumeTypes = {
77
- runtimePkgs: [
78
- ModernJSRuntime
79
- ]
80
- };
81
- } else {
82
- mfConfig.dts.consumeTypes.runtimePkgs = mfConfig.dts.consumeTypes.runtimePkgs || [];
83
- if (!mfConfig.dts.consumeTypes.runtimePkgs.includes(ModernJSRuntime)) {
84
- mfConfig.dts.consumeTypes.runtimePkgs.push(ModernJSRuntime);
85
- }
86
- }
87
- }
88
- }
89
- };
90
- const patchMFConfig = (mfConfig, isServer, remoteIpStrategy) => {
91
- replaceRemoteUrl(mfConfig, remoteIpStrategy);
92
- if (mfConfig.remoteType === void 0) {
93
- mfConfig.remoteType = "script";
94
- }
95
- if (!mfConfig.name) {
96
- throw new Error(`${PLUGIN_IDENTIFIER} mfConfig.name can not be empty!`);
97
- }
98
- const runtimePlugins = [
99
- ...mfConfig.runtimePlugins || []
100
- ];
101
- patchDTSConfig(mfConfig, isServer);
102
- injectRuntimePlugins(require.resolve("@module-federation/modern-js/shared-strategy"), runtimePlugins);
103
- if (isDev) {
104
- injectRuntimePlugins(require.resolve("@module-federation/modern-js/resolve-entry-ipv4"), runtimePlugins);
105
- }
106
- if (isServer) {
107
- injectRuntimePlugins(require.resolve("@module-federation/node/runtimePlugin"), runtimePlugins);
108
- if (isDev) {
109
- injectRuntimePlugins(require.resolve("@module-federation/node/record-dynamic-remote-entry-hash-plugin"), runtimePlugins);
110
- }
111
- injectRuntimePlugins(require.resolve("@module-federation/modern-js/inject-node-fetch"), runtimePlugins);
112
- if (!mfConfig.library) {
113
- mfConfig.library = {
114
- type: "commonjs-module",
115
- name: mfConfig.name
116
- };
117
- } else {
118
- if (!mfConfig.library.type) {
119
- mfConfig.library.type = "commonjs-module";
120
- }
121
- if (!mfConfig.library.name) {
122
- mfConfig.library.name = mfConfig.name;
123
- }
124
- }
125
- }
126
- mfConfig.runtimePlugins = runtimePlugins;
127
- if (!isServer) {
128
- var _mfConfig_library;
129
- if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
130
- mfConfig.library.type = "global";
131
- }
132
- return mfConfig;
133
- }
134
- mfConfig.dts = false;
135
- mfConfig.dev = false;
136
- return mfConfig;
137
- };
138
- function patchIgnoreWarning(chain) {
139
- const ignoreWarnings = chain.get("ignoreWarnings") || [];
140
- const ignoredMsgs = [
141
- "external script",
142
- "process.env.WS_NO_BUFFER_UTIL",
143
- `Can't resolve 'utf-8-validate`
144
- ];
145
- ignoreWarnings.push((warning) => {
146
- if (ignoredMsgs.some((msg) => warning.message.includes(msg))) {
147
- return true;
148
- }
149
- return false;
150
- });
151
- chain.ignoreWarnings(ignoreWarnings);
152
- }
153
- function addMyTypes2Ignored(chain, mfConfig) {
154
- const watchOptions = chain.get("watchOptions");
155
- if (!watchOptions || !watchOptions.ignored) {
156
- chain.watchOptions({
157
- ignored: /[\\/](?:\.git|node_modules|@mf-types)[\\/]/
158
- });
159
- return;
160
- }
161
- const ignored = watchOptions.ignored;
162
- const DEFAULT_IGNORED_GLOB = "**/@mf-types/**";
163
- if (Array.isArray(ignored)) {
164
- if (mfConfig.dts !== false && typeof mfConfig.dts === "object" && typeof mfConfig.dts.consumeTypes === "object" && mfConfig.dts.consumeTypes.remoteTypesFolder) {
165
- chain.watchOptions({
166
- ...watchOptions,
167
- ignored: ignored.concat(`**/${mfConfig.dts.consumeTypes.remoteTypesFolder}/**`)
168
- });
169
- } else {
170
- chain.watchOptions({
171
- ...watchOptions,
172
- ignored: ignored.concat(DEFAULT_IGNORED_GLOB)
173
- });
174
- }
175
- return;
176
- }
177
- if (typeof ignored !== "string") {
178
- chain.watchOptions({
179
- ...watchOptions,
180
- ignored: /[\\/](?:\.git|node_modules|@mf-types)[\\/]/
181
- });
182
- return;
183
- }
184
- chain.watchOptions({
185
- ...watchOptions,
186
- ignored: ignored.concat(DEFAULT_IGNORED_GLOB)
187
- });
188
- }
189
- function patchBundlerConfig(options) {
190
- var _modernjsConfig_deploy;
191
- const { chain, modernjsConfig, isServer, mfConfig, enableSSR } = options;
192
- chain.optimization.delete("runtimeChunk");
193
- patchIgnoreWarning(chain);
194
- if (!chain.output.get("chunkLoadingGlobal")) {
195
- chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
196
- }
197
- if (!chain.output.get("uniqueName")) {
198
- chain.output.uniqueName(mfConfig.name);
199
- }
200
- const splitChunkConfig = chain.optimization.splitChunks.entries();
201
- if (!isServer) {
202
- autoDeleteSplitChunkCacheGroups(mfConfig, splitChunkConfig);
203
- }
204
- if (!isServer && enableSSR && splitChunkConfig && typeof splitChunkConfig === "object" && splitChunkConfig.cacheGroups) {
205
- splitChunkConfig.chunks = "async";
206
- logger.warn(`splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"`);
207
- }
208
- if (isDev && chain.output.get("publicPath") === "auto") {
209
- var _modernjsConfig_dev, _modernjsConfig_server;
210
- const port = ((_modernjsConfig_dev = modernjsConfig.dev) === null || _modernjsConfig_dev === void 0 ? void 0 : _modernjsConfig_dev.port) || ((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.port) || 8080;
211
- const publicPath = `http://localhost:${port}/`;
212
- chain.output.publicPath(publicPath);
213
- }
214
- if (isServer && enableSSR) {
215
- const uniqueName = mfConfig.name || chain.output.get("uniqueName");
216
- const chunkFileName = chain.output.get("chunkFilename");
217
- if (typeof chunkFileName === "string" && uniqueName && !chunkFileName.includes(uniqueName)) {
218
- const suffix = `${encodeName(uniqueName)}-[chunkhash].js`;
219
- chain.output.chunkFilename(chunkFileName.replace(".js", suffix));
220
- }
221
- }
222
- if (isDev && enableSSR && !isServer) {
223
- chain.resolve.fallback.set("crypto", false).set("stream", false).set("vm", false);
224
- }
225
- if (((_modernjsConfig_deploy = modernjsConfig.deploy) === null || _modernjsConfig_deploy === void 0 ? void 0 : _modernjsConfig_deploy.microFrontend) && Object.keys(mfConfig.exposes || {}).length) {
226
- chain.optimization.usedExports(false);
227
- }
228
- }
229
2
  const localIpv4 = "127.0.0.1";
230
3
  const getIpv4Interfaces = () => {
231
4
  try {
@@ -270,11 +43,7 @@ const skipByTarget = (target) => {
270
43
  return false;
271
44
  };
272
45
  export {
273
- addMyTypes2Ignored,
274
46
  getIPV4,
275
- getMFConfig,
276
47
  isWebTarget,
277
- patchBundlerConfig,
278
- patchMFConfig,
279
48
  skipByTarget
280
49
  };
@@ -1,8 +1,6 @@
1
- const MODERN_JS_SERVER_DIR = "bundles";
2
1
  const LOCALHOST = "localhost";
3
2
  const PLUGIN_IDENTIFIER = "[ Modern.js Module Federation ]";
4
3
  export {
5
4
  LOCALHOST,
6
- MODERN_JS_SERVER_DIR,
7
5
  PLUGIN_IDENTIFIER
8
6
  };
@@ -1,7 +1,21 @@
1
- import type { CliPluginFuture, AppTools } from '@modern-js/app-tools';
2
- import type { InternalModernPluginOptions } from '../types';
3
1
  import { isWebTarget, skipByTarget } from './utils';
2
+ import { moduleFederationPlugin } from '@module-federation/sdk';
3
+ import { PluginOptions } from '../types';
4
+ import type { InternalModernPluginOptions } from '../types';
5
+ import type { AppTools, webpack, UserConfig, Rspack, CliPluginFuture } from '@modern-js/app-tools';
6
+ import type { BundlerChainConfig } from '../interfaces/bundler';
7
+ export type ConfigType<T> = T extends 'webpack' ? webpack.Configuration : T extends 'rspack' ? Rspack.Configuration : never;
4
8
  export declare function setEnv(enableSSR: boolean): void;
9
+ export declare const getMFConfig: (userConfig: PluginOptions) => Promise<moduleFederationPlugin.ModuleFederationPluginOptions>;
10
+ export declare const patchMFConfig: (mfConfig: moduleFederationPlugin.ModuleFederationPluginOptions, isServer: boolean, remoteIpStrategy?: "ipv4" | "inherit") => moduleFederationPlugin.ModuleFederationPluginOptions;
11
+ export declare function addMyTypes2Ignored(chain: BundlerChainConfig, mfConfig: moduleFederationPlugin.ModuleFederationPluginOptions): void;
12
+ export declare function patchBundlerConfig(options: {
13
+ chain: BundlerChainConfig;
14
+ isServer: boolean;
15
+ modernjsConfig: UserConfig<AppTools>;
16
+ mfConfig: moduleFederationPlugin.ModuleFederationPluginOptions;
17
+ enableSSR: boolean;
18
+ }): void;
5
19
  export declare const moduleFederationConfigPlugin: (userConfig: InternalModernPluginOptions) => CliPluginFuture<AppTools>;
6
20
  export default moduleFederationConfigPlugin;
7
21
  export { isWebTarget, skipByTarget };
@@ -1,2 +1,2 @@
1
1
  import { BundlerPlugin } from '../types';
2
- export declare function updateStatsAndManifest(nodePlugin: BundlerPlugin, browserPlugin: BundlerPlugin, outputDir: string, ssrDir: string): void;
2
+ export declare function updateStatsAndManifest(nodePlugin: BundlerPlugin, browserPlugin: BundlerPlugin, outputDir: string, ssrPublicPath: string): void;
@@ -1,18 +1,5 @@
1
- import { moduleFederationPlugin } from '@module-federation/sdk';
2
- import { PluginOptions } from '../types';
3
- import type { BundlerChainConfig } from '../interfaces/bundler';
4
- import type { webpack, UserConfig, AppTools, Rspack } from '@modern-js/app-tools';
1
+ import type { webpack, Rspack } from '@modern-js/app-tools';
5
2
  export type ConfigType<T> = T extends 'webpack' ? webpack.Configuration : T extends 'rspack' ? Rspack.Configuration : never;
6
- export declare const getMFConfig: (userConfig: PluginOptions) => Promise<moduleFederationPlugin.ModuleFederationPluginOptions>;
7
- export declare const patchMFConfig: (mfConfig: moduleFederationPlugin.ModuleFederationPluginOptions, isServer: boolean, remoteIpStrategy?: "ipv4" | "inherit") => moduleFederationPlugin.ModuleFederationPluginOptions;
8
- export declare function addMyTypes2Ignored(chain: BundlerChainConfig, mfConfig: moduleFederationPlugin.ModuleFederationPluginOptions): void;
9
- export declare function patchBundlerConfig(options: {
10
- chain: BundlerChainConfig;
11
- isServer: boolean;
12
- modernjsConfig: UserConfig<AppTools>;
13
- mfConfig: moduleFederationPlugin.ModuleFederationPluginOptions;
14
- enableSSR: boolean;
15
- }): void;
16
3
  export declare const getIPV4: () => string;
17
4
  export declare const isWebTarget: (target: string[] | string) => boolean;
18
5
  export declare const skipByTarget: (target: string[] | string) => boolean;
@@ -1,3 +1,2 @@
1
- export declare const MODERN_JS_SERVER_DIR = "bundles";
2
1
  export declare const LOCALHOST = "localhost";
3
2
  export declare const PLUGIN_IDENTIFIER = "[ Modern.js Module Federation ]";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20250401063000",
3
+ "version": "0.0.0-next-20250402032411",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -89,19 +89,20 @@
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-20250401063000",
93
- "@module-federation/enhanced": "0.0.0-next-20250401063000",
94
- "@module-federation/node": "0.0.0-next-20250401063000",
95
- "@module-federation/sdk": "0.0.0-next-20250401063000",
96
- "@module-federation/cli": "0.0.0-next-20250401063000"
92
+ "@module-federation/rsbuild-plugin": "0.0.0-next-20250402032411",
93
+ "@module-federation/enhanced": "0.0.0-next-20250402032411",
94
+ "@module-federation/node": "0.0.0-next-20250402032411",
95
+ "@module-federation/sdk": "0.0.0-next-20250402032411",
96
+ "@module-federation/cli": "0.0.0-next-20250402032411"
97
97
  },
98
98
  "devDependencies": {
99
+ "@rsbuild/core": "1.2.8",
99
100
  "@modern-js/app-tools": "2.65.1",
100
101
  "@modern-js/core": "2.65.1",
101
102
  "@modern-js/module-tools": "2.65.1",
102
103
  "@modern-js/runtime": "2.65.1",
103
104
  "@modern-js/tsconfig": "2.65.1",
104
- "@module-federation/manifest": "0.0.0-next-20250401063000"
105
+ "@module-federation/manifest": "0.0.0-next-20250402032411"
105
106
  },
106
107
  "peerDependencies": {
107
108
  "react": ">=17",