@module-federation/modern-js 0.0.0-next-20241010063233 → 0.0.0-next-20241010084324

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,5 +1,4 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
- import { _ as _type_of } from "@swc/helpers/_/_type_of";
3
2
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
3
  import { ModuleFederationPlugin as WebpackModuleFederationPlugin, AsyncBoundaryPlugin } from "@module-federation/enhanced";
5
4
  import { ModuleFederationPlugin as RspackModuleFederationPlugin } from "@module-federation/enhanced/rspack";
@@ -54,7 +53,7 @@ var moduleFederationPlugin = function() {
54
53
  var enableAsyncEntry = (_modernjsConfig_source = modernjsConfig.source) === null || _modernjsConfig_source === void 0 ? void 0 : _modernjsConfig_source.enableAsyncEntry;
55
54
  if (!enableAsyncEntry && browserPluginOptions.async !== false) {
56
55
  var _config_plugins1;
57
- var asyncBoundaryPluginOptions = _type_of(browserPluginOptions.async) === "object" ? browserPluginOptions.async : {
56
+ var asyncBoundaryPluginOptions = typeof browserPluginOptions.async === "object" ? browserPluginOptions.async : {
58
57
  eager: function(module) {
59
58
  return module && /\.federation/.test((module === null || module === void 0 ? void 0 : module.request) || "");
60
59
  },
@@ -2,7 +2,6 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
3
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
4
  import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
5
- import { _ as _type_of } from "@swc/helpers/_/_type_of";
6
5
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
7
6
  import { encodeName } from "@module-federation/sdk";
8
7
  import path from "path";
@@ -70,7 +69,7 @@ var replaceRemoteUrl = function(mfConfig, remoteIpStrategy) {
70
69
  if (typeof remote === "string" && remote.includes(LOCALHOST)) {
71
70
  remoteObject[remoteKey] = remote.replace(LOCALHOST, ipv4);
72
71
  }
73
- if ((typeof remote === "undefined" ? "undefined" : _type_of(remote)) === "object" && !Array.isArray(remote.external) && remote.external.includes(LOCALHOST)) {
72
+ if (typeof remote === "object" && !Array.isArray(remote.external) && remote.external.includes(LOCALHOST)) {
74
73
  remote.external = remote.external.replace(LOCALHOST, ipv4);
75
74
  }
76
75
  });
@@ -198,7 +197,7 @@ function patchBundlerConfig(options) {
198
197
  }
199
198
  }
200
199
  if (mfConfig.dts !== false) {
201
- if (_type_of(mfConfig.dts) === "object" && _type_of(mfConfig.dts.consumeTypes) === "object" && mfConfig.dts.consumeTypes.remoteTypesFolder) {
200
+ if (typeof mfConfig.dts === "object" && typeof mfConfig.dts.consumeTypes === "object" && mfConfig.dts.consumeTypes.remoteTypesFolder) {
202
201
  bundlerConfig.watchOptions.ignored.push("**/".concat(mfConfig.dts.consumeTypes.remoteTypesFolder, "/**"));
203
202
  } else {
204
203
  bundlerConfig.watchOptions.ignored.push("**/@mf-types/**");
@@ -219,7 +218,7 @@ function patchBundlerConfig(options) {
219
218
  if (!isServer) {
220
219
  autoDeleteSplitChunkCacheGroups(mfConfig, bundlerConfig);
221
220
  }
222
- if (!isServer && enableSSR && _type_of((_bundlerConfig_optimization1 = bundlerConfig.optimization) === null || _bundlerConfig_optimization1 === void 0 ? void 0 : _bundlerConfig_optimization1.splitChunks) === "object" && bundlerConfig.optimization.splitChunks.cacheGroups) {
221
+ if (!isServer && enableSSR && typeof ((_bundlerConfig_optimization1 = bundlerConfig.optimization) === null || _bundlerConfig_optimization1 === void 0 ? void 0 : _bundlerConfig_optimization1.splitChunks) === "object" && bundlerConfig.optimization.splitChunks.cacheGroups) {
223
222
  bundlerConfig.optimization.splitChunks.chunks = "async";
224
223
  console.warn("".concat(PLUGIN_IDENTIFIER, ' splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"'));
225
224
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20241010063233",
3
+ "version": "0.0.0-next-20241010084324",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -55,24 +55,24 @@
55
55
  "author": "hanric <hanric.zhang@gmail.com>",
56
56
  "license": "MIT",
57
57
  "dependencies": {
58
- "@modern-js/node-bundle-require": "2.60.2",
59
- "@modern-js/utils": "2.60.2",
60
58
  "@swc/helpers": "0.5.12",
61
- "hoist-non-react-statics": "3.3.2",
59
+ "@modern-js/utils": "2.54.2",
60
+ "@modern-js/node-bundle-require": "2.54.2",
62
61
  "node-fetch": "~3.3.0",
63
62
  "react-error-boundary": "4.0.13",
64
- "@module-federation/enhanced": "0.0.0-next-20241010063233",
65
- "@module-federation/node": "0.0.0-next-20241010063233",
66
- "@module-federation/sdk": "0.0.0-next-20241010063233"
63
+ "hoist-non-react-statics": "3.3.2",
64
+ "@module-federation/sdk": "0.0.0-next-20241010084324",
65
+ "@module-federation/enhanced": "0.0.0-next-20241010084324",
66
+ "@module-federation/node": "0.0.0-next-20241010084324"
67
67
  },
68
68
  "devDependencies": {
69
- "@modern-js/app-tools": "2.60.2",
70
- "@modern-js/core": "2.60.2",
71
- "@modern-js/module-tools": "2.60.2",
72
- "@modern-js/runtime": "2.60.2",
73
- "@modern-js/tsconfig": "2.60.2",
74
- "@types/hoist-non-react-statics": "3.3.5",
75
- "@module-federation/manifest": "0.0.0-next-20241010063233"
69
+ "@types/hoist-non-react-statics": "3.3.2",
70
+ "@modern-js/app-tools": "2.57.0",
71
+ "@modern-js/core": "2.57.0",
72
+ "@modern-js/runtime": "2.57.0",
73
+ "@modern-js/module-tools": "2.57.0",
74
+ "@modern-js/tsconfig": "2.57.0",
75
+ "@module-federation/manifest": "0.0.0-next-20241010084324"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": ">=17",