@module-federation/modern-js 0.0.0-next-20240516123450 → 0.0.0-next-20240516132001
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/utils.js +10 -0
- package/dist/esm/cli/utils.js +9 -0
- package/dist/esm-node/cli/utils.js +10 -0
- package/package.json +5 -5
package/dist/cjs/cli/utils.js
CHANGED
|
@@ -58,6 +58,7 @@ const patchMFConfig = (mfConfig) => {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
function getTargetEnvConfig(mfConfig, isServer) {
|
|
61
|
+
var _mfConfig_library;
|
|
61
62
|
patchMFConfig(mfConfig);
|
|
62
63
|
if (isServer) {
|
|
63
64
|
return {
|
|
@@ -68,6 +69,15 @@ function getTargetEnvConfig(mfConfig, isServer) {
|
|
|
68
69
|
...mfConfig
|
|
69
70
|
};
|
|
70
71
|
}
|
|
72
|
+
if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
|
|
73
|
+
return {
|
|
74
|
+
...mfConfig,
|
|
75
|
+
library: {
|
|
76
|
+
...mfConfig.library,
|
|
77
|
+
type: "global"
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
71
81
|
return mfConfig;
|
|
72
82
|
}
|
|
73
83
|
function patchWebpackConfig(options) {
|
package/dist/esm/cli/utils.js
CHANGED
|
@@ -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";
|
|
@@ -52,6 +53,7 @@ var patchMFConfig = function(mfConfig) {
|
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
function getTargetEnvConfig(mfConfig, isServer) {
|
|
56
|
+
var _mfConfig_library;
|
|
55
57
|
patchMFConfig(mfConfig);
|
|
56
58
|
if (isServer) {
|
|
57
59
|
return _object_spread({
|
|
@@ -61,6 +63,13 @@ function getTargetEnvConfig(mfConfig, isServer) {
|
|
|
61
63
|
}
|
|
62
64
|
}, mfConfig);
|
|
63
65
|
}
|
|
66
|
+
if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
|
|
67
|
+
return _object_spread_props(_object_spread({}, mfConfig), {
|
|
68
|
+
library: _object_spread_props(_object_spread({}, mfConfig.library), {
|
|
69
|
+
type: "global"
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
}
|
|
64
73
|
return mfConfig;
|
|
65
74
|
}
|
|
66
75
|
function patchWebpackConfig(options) {
|
|
@@ -22,6 +22,7 @@ const patchMFConfig = (mfConfig) => {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
function getTargetEnvConfig(mfConfig, isServer) {
|
|
25
|
+
var _mfConfig_library;
|
|
25
26
|
patchMFConfig(mfConfig);
|
|
26
27
|
if (isServer) {
|
|
27
28
|
return {
|
|
@@ -32,6 +33,15 @@ function getTargetEnvConfig(mfConfig, isServer) {
|
|
|
32
33
|
...mfConfig
|
|
33
34
|
};
|
|
34
35
|
}
|
|
36
|
+
if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
|
|
37
|
+
return {
|
|
38
|
+
...mfConfig,
|
|
39
|
+
library: {
|
|
40
|
+
...mfConfig.library,
|
|
41
|
+
type: "global"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
35
45
|
return mfConfig;
|
|
36
46
|
}
|
|
37
47
|
function patchWebpackConfig(options) {
|
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-20240516132001",
|
|
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-
|
|
42
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
43
|
-
"@module-federation/node": "0.0.0-next-
|
|
41
|
+
"@module-federation/sdk": "0.0.0-next-20240516132001",
|
|
42
|
+
"@module-federation/enhanced": "0.0.0-next-20240516132001",
|
|
43
|
+
"@module-federation/node": "0.0.0-next-20240516132001"
|
|
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-
|
|
51
|
+
"@module-federation/manifest": "0.0.0-next-20240516132001"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "modern build"
|