@module-federation/modern-js 0.0.0-next-20250219100104 → 0.0.0-next-20250219105538

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.
@@ -45,8 +45,6 @@ const moduleFederationPlugin = (userConfig = {}) => {
45
45
  const modernjsConfig = api.getConfig();
46
46
  api.modifyBundlerChain((chain, { isServer }) => {
47
47
  const bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
48
- console.log("index bundlerType", bundlerType);
49
- console.log("index isServer", isServer);
50
48
  const browserPluginOptions = internalModernPluginOptions.csrConfig;
51
49
  const MFPlugin = bundlerType === "webpack" ? import_enhanced.ModuleFederationPlugin : import_rspack.ModuleFederationPlugin;
52
50
  if (!isServer) {
@@ -57,8 +57,6 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
57
57
  var _pluginOptions_userConfig, _modernjsConfig_server;
58
58
  const modernjsConfig = api.getConfig();
59
59
  const enableSSR = ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false ? false : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
60
- console.log("enableSSR: ", enableSSR);
61
- console.log("isDev: ", import_constant.isDev);
62
60
  if (!enableSSR) {
63
61
  return;
64
62
  }
@@ -82,8 +80,6 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
82
80
  });
83
81
  api.modifyBundlerChain((chain, { isServer }) => {
84
82
  const bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
85
- console.log("ssrPlugin bundlerType: ", bundlerType);
86
- console.log("ssrPlugin isServer: ", isServer);
87
83
  const MFPlugin = bundlerType === "webpack" ? import_webpack.ModuleFederationPlugin : import_rspack.ModuleFederationPlugin;
88
84
  if (isServer) {
89
85
  if (!chain.plugins.has(CHAIN_MF_PLUGIN_ID)) {
@@ -228,13 +228,14 @@ function patchBundlerConfig(options) {
228
228
  const { chain, modernjsConfig, isServer, mfConfig } = options;
229
229
  const enableSSR = Boolean((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
230
230
  chain.optimization.delete("runtimeChunk");
231
+ patchIgnoreWarning(chain);
231
232
  if (!chain.output.get("chunkLoadingGlobal")) {
232
233
  chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
233
234
  }
234
235
  if (!chain.output.get("uniqueName")) {
235
236
  chain.output.uniqueName(mfConfig.name);
236
237
  }
237
- const splitChunkConfig = chain.optimization.entries();
238
+ const splitChunkConfig = chain.optimization.splitChunks.entries();
238
239
  if (!isServer) {
239
240
  (0, import_utils.autoDeleteSplitChunkCacheGroups)(mfConfig, splitChunkConfig);
240
241
  }
@@ -27,8 +27,6 @@ var moduleFederationPlugin = function() {
27
27
  api.modifyBundlerChain(function(chain, param) {
28
28
  var isServer = param.isServer;
29
29
  var bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
30
- console.log("index bundlerType", bundlerType);
31
- console.log("index isServer", isServer);
32
30
  var browserPluginOptions = internalModernPluginOptions.csrConfig;
33
31
  var MFPlugin = bundlerType === "webpack" ? WebpackModuleFederationPlugin : RspackModuleFederationPlugin;
34
32
  if (!isServer) {
@@ -26,8 +26,6 @@ var moduleFederationSSRPlugin = function(pluginOptions) {
26
26
  return _ts_generator(this, function(_state) {
27
27
  modernjsConfig = api.getConfig();
28
28
  enableSSR = ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false ? false : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
29
- console.log("enableSSR: ", enableSSR);
30
- console.log("isDev: ", isDev);
31
29
  if (!enableSSR) {
32
30
  return [
33
31
  2
@@ -55,8 +53,6 @@ var moduleFederationSSRPlugin = function(pluginOptions) {
55
53
  api.modifyBundlerChain(function(chain, param) {
56
54
  var isServer = param.isServer;
57
55
  var bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
58
- console.log("ssrPlugin bundlerType: ", bundlerType);
59
- console.log("ssrPlugin isServer: ", isServer);
60
56
  var MFPlugin = bundlerType === "webpack" ? ModuleFederationPlugin : RspackModuleFederationPlugin;
61
57
  if (isServer) {
62
58
  if (!chain.plugins.has(CHAIN_MF_PLUGIN_ID)) {
@@ -220,13 +220,14 @@ function patchBundlerConfig(options) {
220
220
  var chain = options.chain, modernjsConfig = options.modernjsConfig, isServer = options.isServer, mfConfig = options.mfConfig;
221
221
  var enableSSR = Boolean((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
222
222
  chain.optimization.delete("runtimeChunk");
223
+ patchIgnoreWarning(chain);
223
224
  if (!chain.output.get("chunkLoadingGlobal")) {
224
225
  chain.output.chunkLoadingGlobal("chunk_".concat(mfConfig.name));
225
226
  }
226
227
  if (!chain.output.get("uniqueName")) {
227
228
  chain.output.uniqueName(mfConfig.name);
228
229
  }
229
- var splitChunkConfig = chain.optimization.entries();
230
+ var splitChunkConfig = chain.optimization.splitChunks.entries();
230
231
  if (!isServer) {
231
232
  autoDeleteSplitChunkCacheGroups(mfConfig, splitChunkConfig);
232
233
  }
@@ -19,8 +19,6 @@ const moduleFederationPlugin = (userConfig = {}) => {
19
19
  const modernjsConfig = api.getConfig();
20
20
  api.modifyBundlerChain((chain, { isServer }) => {
21
21
  const bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
22
- console.log("index bundlerType", bundlerType);
23
- console.log("index isServer", isServer);
24
22
  const browserPluginOptions = internalModernPluginOptions.csrConfig;
25
23
  const MFPlugin = bundlerType === "webpack" ? WebpackModuleFederationPlugin : RspackModuleFederationPlugin;
26
24
  if (!isServer) {
@@ -21,8 +21,6 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
21
21
  var _pluginOptions_userConfig, _modernjsConfig_server;
22
22
  const modernjsConfig = api.getConfig();
23
23
  const enableSSR = ((_pluginOptions_userConfig = pluginOptions.userConfig) === null || _pluginOptions_userConfig === void 0 ? void 0 : _pluginOptions_userConfig.ssr) === false ? false : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
24
- console.log("enableSSR: ", enableSSR);
25
- console.log("isDev: ", isDev);
26
24
  if (!enableSSR) {
27
25
  return;
28
26
  }
@@ -46,8 +44,6 @@ const moduleFederationSSRPlugin = (pluginOptions) => ({
46
44
  });
47
45
  api.modifyBundlerChain((chain, { isServer }) => {
48
46
  const bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
49
- console.log("ssrPlugin bundlerType: ", bundlerType);
50
- console.log("ssrPlugin isServer: ", isServer);
51
47
  const MFPlugin = bundlerType === "webpack" ? ModuleFederationPlugin : RspackModuleFederationPlugin;
52
48
  if (isServer) {
53
49
  if (!chain.plugins.has(CHAIN_MF_PLUGIN_ID)) {
@@ -191,13 +191,14 @@ function patchBundlerConfig(options) {
191
191
  const { chain, modernjsConfig, isServer, mfConfig } = options;
192
192
  const enableSSR = Boolean((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
193
193
  chain.optimization.delete("runtimeChunk");
194
+ patchIgnoreWarning(chain);
194
195
  if (!chain.output.get("chunkLoadingGlobal")) {
195
196
  chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
196
197
  }
197
198
  if (!chain.output.get("uniqueName")) {
198
199
  chain.output.uniqueName(mfConfig.name);
199
200
  }
200
- const splitChunkConfig = chain.optimization.entries();
201
+ const splitChunkConfig = chain.optimization.splitChunks.entries();
201
202
  if (!isServer) {
202
203
  autoDeleteSplitChunkCacheGroups(mfConfig, splitChunkConfig);
203
204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20250219100104",
3
+ "version": "0.0.0-next-20250219105538",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -89,10 +89,10 @@
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-20250219100104",
93
- "@module-federation/enhanced": "0.0.0-next-20250219100104",
94
- "@module-federation/node": "0.0.0-next-20250219100104",
95
- "@module-federation/sdk": "0.0.0-next-20250219100104"
92
+ "@module-federation/rsbuild-plugin": "0.0.0-next-20250219105538",
93
+ "@module-federation/enhanced": "0.0.0-next-20250219105538",
94
+ "@module-federation/node": "0.0.0-next-20250219105538",
95
+ "@module-federation/sdk": "0.0.0-next-20250219105538"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@modern-js/app-tools": "2.64.3",
@@ -100,7 +100,7 @@
100
100
  "@modern-js/module-tools": "2.64.3",
101
101
  "@modern-js/runtime": "2.64.3",
102
102
  "@modern-js/tsconfig": "2.64.3",
103
- "@module-federation/manifest": "0.0.0-next-20250219100104"
103
+ "@module-federation/manifest": "0.0.0-next-20250219105538"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": ">=17",