@module-federation/modern-js 0.0.0-next-20240516124658 → 0.0.0-next-20240516132020

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.
@@ -70,7 +70,13 @@ function getTargetEnvConfig(mfConfig, isServer) {
70
70
  };
71
71
  }
72
72
  if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
73
- mfConfig.library.type = "global";
73
+ return {
74
+ ...mfConfig,
75
+ library: {
76
+ ...mfConfig.library,
77
+ type: "global"
78
+ }
79
+ };
74
80
  }
75
81
  return mfConfig;
76
82
  }
@@ -1,5 +1,6 @@
1
1
  import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
+ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
4
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
5
  import path from "path";
5
6
  import { bundle } from "@modern-js/node-bundle-require";
@@ -63,7 +64,11 @@ function getTargetEnvConfig(mfConfig, isServer) {
63
64
  }, mfConfig);
64
65
  }
65
66
  if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
66
- mfConfig.library.type = "global";
67
+ return _object_spread_props(_object_spread({}, mfConfig), {
68
+ library: _object_spread_props(_object_spread({}, mfConfig.library), {
69
+ type: "global"
70
+ })
71
+ });
67
72
  }
68
73
  return mfConfig;
69
74
  }
@@ -34,7 +34,13 @@ function getTargetEnvConfig(mfConfig, isServer) {
34
34
  };
35
35
  }
36
36
  if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
37
- mfConfig.library.type = "global";
37
+ return {
38
+ ...mfConfig,
39
+ library: {
40
+ ...mfConfig.library,
41
+ type: "global"
42
+ }
43
+ };
38
44
  }
39
45
  return mfConfig;
40
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20240516124658",
3
+ "version": "0.0.0-next-20240516132020",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -38,9 +38,9 @@
38
38
  "@swc/helpers": "0.5.3",
39
39
  "@modern-js/utils": "^2.49.2",
40
40
  "@modern-js/node-bundle-require": "^2.49.2",
41
- "@module-federation/sdk": "0.0.0-next-20240516124658",
42
- "@module-federation/enhanced": "0.0.0-next-20240516124658",
43
- "@module-federation/node": "0.0.0-next-20240516124658"
41
+ "@module-federation/sdk": "0.0.0-next-20240516132020",
42
+ "@module-federation/enhanced": "0.0.0-next-20240516132020",
43
+ "@module-federation/node": "0.0.0-next-20240516132020"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@modern-js/app-tools": "^2.49.2",
@@ -48,7 +48,7 @@
48
48
  "@modern-js/runtime": "^2.49.2",
49
49
  "@modern-js/module-tools": "^2.35.0",
50
50
  "@modern-js/tsconfig": "^2.35.0",
51
- "@module-federation/manifest": "0.0.0-next-20240516124658"
51
+ "@module-federation/manifest": "0.0.0-next-20240516132020"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "modern build"