@module-federation/modern-js 0.0.0-next-20240520135817 → 0.0.0-next-20240521123600
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/index.js +6 -10
- package/dist/cjs/cli/utils.js +7 -15
- package/dist/esm/cli/index.js +8 -12
- package/dist/esm/cli/utils.js +7 -15
- package/dist/esm-node/cli/index.js +7 -11
- package/dist/esm-node/cli/utils.js +7 -15
- package/package.json +9 -6
- package/dist/cjs/cli/mfRuntimePlugins/inject-node-fetch.js +0 -44
- package/dist/esm/cli/mfRuntimePlugins/inject-node-fetch.js +0 -16
- package/dist/esm-node/cli/mfRuntimePlugins/inject-node-fetch.js +0 -14
- package/dist/types/cli/mfRuntimePlugins/inject-node-fetch.d.ts +0 -3
package/dist/cjs/cli/index.js
CHANGED
|
@@ -52,15 +52,15 @@ const moduleFederationPlugin = (userConfig = {}) => ({
|
|
|
52
52
|
const enableSSR = Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
|
|
53
53
|
const mfConfig = await (0, import_utils2.getMFConfig)(userConfig);
|
|
54
54
|
let outputDir = "";
|
|
55
|
+
const bundlerType = useAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
|
|
56
|
+
const WebpackPluginConstructor = userConfig.webpackPluginImplementation || import_enhanced.ModuleFederationPlugin;
|
|
57
|
+
const RspackPluginConstructor = userConfig.webpackPluginImplementation || import_rspack.ModuleFederationPlugin;
|
|
58
|
+
const MFBundlerPlugin = bundlerType === "rspack" ? RspackPluginConstructor : WebpackPluginConstructor;
|
|
55
59
|
let browserPlugin;
|
|
56
60
|
let nodePlugin;
|
|
57
61
|
return {
|
|
58
62
|
config: () => {
|
|
59
63
|
var _modernjsConfig_dev;
|
|
60
|
-
const bundlerType = useAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
|
|
61
|
-
const WebpackPluginConstructor = userConfig.webpackPluginImplementation || import_enhanced.ModuleFederationPlugin;
|
|
62
|
-
const RspackPluginConstructor = userConfig.rspackPluginImplementation || import_rspack.ModuleFederationPlugin;
|
|
63
|
-
const MFBundlerPlugin = bundlerType === "rspack" ? RspackPluginConstructor : WebpackPluginConstructor;
|
|
64
64
|
if (enableSSR) {
|
|
65
65
|
process.env["MF_DISABLE_EMIT_STATS"] = "true";
|
|
66
66
|
process.env["MF_SSR_PRJ"] = "true";
|
|
@@ -72,15 +72,11 @@ const moduleFederationPlugin = (userConfig = {}) => ({
|
|
|
72
72
|
nodePlugin = new MFBundlerPlugin(envConfig);
|
|
73
73
|
(_config_plugins = config.plugins) === null || _config_plugins === void 0 ? void 0 : _config_plugins.push(nodePlugin);
|
|
74
74
|
(_config_plugins1 = config.plugins) === null || _config_plugins1 === void 0 ? void 0 : _config_plugins1.push(new import_node.StreamingTargetPlugin(envConfig));
|
|
75
|
-
if (isDev) {
|
|
76
|
-
var _config_plugins2;
|
|
77
|
-
(_config_plugins2 = config.plugins) === null || _config_plugins2 === void 0 ? void 0 : _config_plugins2.push(new import_node.EntryChunkTrackerPlugin());
|
|
78
|
-
}
|
|
79
75
|
} else {
|
|
80
|
-
var _config_output,
|
|
76
|
+
var _config_output, _config_plugins2;
|
|
81
77
|
outputDir = ((_config_output = config.output) === null || _config_output === void 0 ? void 0 : _config_output.path) || import_path.default.resolve(process.cwd(), "dist");
|
|
82
78
|
browserPlugin = new MFBundlerPlugin(envConfig);
|
|
83
|
-
(
|
|
79
|
+
(_config_plugins2 = config.plugins) === null || _config_plugins2 === void 0 ? void 0 : _config_plugins2.push(browserPlugin);
|
|
84
80
|
}
|
|
85
81
|
(0, import_utils2.patchWebpackConfig)({
|
|
86
82
|
bundlerConfig: config,
|
package/dist/cjs/cli/utils.js
CHANGED
|
@@ -34,7 +34,6 @@ __export(utils_exports, {
|
|
|
34
34
|
patchWebpackConfig: () => patchWebpackConfig
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(utils_exports);
|
|
37
|
-
var import_sdk = require("@module-federation/sdk");
|
|
38
37
|
var import_path = __toESM(require("path"));
|
|
39
38
|
var import_node_bundle_require = require("@modern-js/node-bundle-require");
|
|
40
39
|
const defaultPath = import_path.default.resolve(process.cwd(), "module-federation.config.ts");
|
|
@@ -52,21 +51,14 @@ const patchMFConfig = (mfConfig, isServer) => {
|
|
|
52
51
|
const runtimePlugins = [
|
|
53
52
|
...mfConfig.runtimePlugins || []
|
|
54
53
|
];
|
|
55
|
-
const
|
|
56
|
-
if (!runtimePlugins.includes(
|
|
57
|
-
runtimePlugins.push(
|
|
54
|
+
const runtimePluginPath = import_path.default.resolve(__dirname, "./mfRuntimePlugins/shared-strategy.js");
|
|
55
|
+
if (!runtimePlugins.includes(runtimePluginPath)) {
|
|
56
|
+
runtimePlugins.push(import_path.default.resolve(__dirname, "./mfRuntimePlugins/shared-strategy.js"));
|
|
58
57
|
}
|
|
59
58
|
if (isServer) {
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
if (!runtimePlugins.includes(nodeHmrPluginPath)) {
|
|
64
|
-
runtimePlugins.push(nodeHmrPluginPath);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
const injectNodeFetchRuntimePluginPath = import_path.default.resolve(__dirname, "./mfRuntimePlugins/inject-node-fetch.js");
|
|
68
|
-
if (!runtimePlugins.includes(injectNodeFetchRuntimePluginPath)) {
|
|
69
|
-
runtimePlugins.push(injectNodeFetchRuntimePluginPath);
|
|
59
|
+
const nodeHmrPluginPath = require.resolve("@module-federation/node/record-dynamic-remote-entry-hash-plugin");
|
|
60
|
+
if (!runtimePlugins.includes(nodeHmrPluginPath)) {
|
|
61
|
+
runtimePlugins.push(nodeHmrPluginPath);
|
|
70
62
|
}
|
|
71
63
|
}
|
|
72
64
|
if (typeof mfConfig.async === "undefined") {
|
|
@@ -120,7 +112,7 @@ function patchWebpackConfig(options) {
|
|
|
120
112
|
const uniqueName = mfConfig.name || (output === null || output === void 0 ? void 0 : output.uniqueName);
|
|
121
113
|
const chunkFileName = output === null || output === void 0 ? void 0 : output.chunkFilename;
|
|
122
114
|
if (output && typeof chunkFileName === "string" && uniqueName && !chunkFileName.includes(uniqueName)) {
|
|
123
|
-
const suffix =
|
|
115
|
+
const suffix = `-[chunkhash].js`;
|
|
124
116
|
output.chunkFilename = chunkFileName.replace(".js", suffix);
|
|
125
117
|
}
|
|
126
118
|
}
|
package/dist/esm/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from "path";
|
|
|
4
4
|
import { fs } from "@modern-js/utils";
|
|
5
5
|
import { ModuleFederationPlugin as WebpackModuleFederationPlugin, AsyncBoundaryPlugin } from "@module-federation/enhanced";
|
|
6
6
|
import { ModuleFederationPlugin as RspackModuleFederationPlugin } from "@module-federation/enhanced/rspack";
|
|
7
|
-
import { StreamingTargetPlugin
|
|
7
|
+
import { StreamingTargetPlugin } from "@module-federation/node";
|
|
8
8
|
import { getMFConfig, getTargetEnvConfig, patchWebpackConfig } from "./utils";
|
|
9
9
|
import { updateStatsAndManifest } from "./manifest";
|
|
10
10
|
import { MODERN_JS_SERVER_DIR } from "../constant";
|
|
@@ -16,7 +16,7 @@ var moduleFederationPlugin = function() {
|
|
|
16
16
|
name: "@modern-js/plugin-module-federation",
|
|
17
17
|
setup: function() {
|
|
18
18
|
var _ref = _async_to_generator(function(param) {
|
|
19
|
-
var useConfigContext, useAppContext, _modernjsConfig_server, modernjsConfig, enableSSR, mfConfig, outputDir, browserPlugin, nodePlugin;
|
|
19
|
+
var useConfigContext, useAppContext, _modernjsConfig_server, modernjsConfig, enableSSR, mfConfig, outputDir, bundlerType, WebpackPluginConstructor, RspackPluginConstructor, MFBundlerPlugin, browserPlugin, nodePlugin;
|
|
20
20
|
return _ts_generator(this, function(_state) {
|
|
21
21
|
switch (_state.label) {
|
|
22
22
|
case 0:
|
|
@@ -30,15 +30,15 @@ var moduleFederationPlugin = function() {
|
|
|
30
30
|
case 1:
|
|
31
31
|
mfConfig = _state.sent();
|
|
32
32
|
outputDir = "";
|
|
33
|
+
bundlerType = useAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
|
|
34
|
+
WebpackPluginConstructor = userConfig.webpackPluginImplementation || WebpackModuleFederationPlugin;
|
|
35
|
+
RspackPluginConstructor = userConfig.webpackPluginImplementation || RspackModuleFederationPlugin;
|
|
36
|
+
MFBundlerPlugin = bundlerType === "rspack" ? RspackPluginConstructor : WebpackPluginConstructor;
|
|
33
37
|
return [
|
|
34
38
|
2,
|
|
35
39
|
{
|
|
36
40
|
config: function() {
|
|
37
41
|
var _modernjsConfig_dev;
|
|
38
|
-
var bundlerType = useAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
|
|
39
|
-
var WebpackPluginConstructor = userConfig.webpackPluginImplementation || WebpackModuleFederationPlugin;
|
|
40
|
-
var RspackPluginConstructor = userConfig.rspackPluginImplementation || RspackModuleFederationPlugin;
|
|
41
|
-
var MFBundlerPlugin = bundlerType === "rspack" ? RspackPluginConstructor : WebpackPluginConstructor;
|
|
42
42
|
if (enableSSR) {
|
|
43
43
|
process.env["MF_DISABLE_EMIT_STATS"] = "true";
|
|
44
44
|
process.env["MF_SSR_PRJ"] = "true";
|
|
@@ -50,15 +50,11 @@ var moduleFederationPlugin = function() {
|
|
|
50
50
|
nodePlugin = new MFBundlerPlugin(envConfig);
|
|
51
51
|
(_config_plugins = config.plugins) === null || _config_plugins === void 0 ? void 0 : _config_plugins.push(nodePlugin);
|
|
52
52
|
(_config_plugins1 = config.plugins) === null || _config_plugins1 === void 0 ? void 0 : _config_plugins1.push(new StreamingTargetPlugin(envConfig));
|
|
53
|
-
if (isDev) {
|
|
54
|
-
var _config_plugins2;
|
|
55
|
-
(_config_plugins2 = config.plugins) === null || _config_plugins2 === void 0 ? void 0 : _config_plugins2.push(new EntryChunkTrackerPlugin());
|
|
56
|
-
}
|
|
57
53
|
} else {
|
|
58
|
-
var _config_output,
|
|
54
|
+
var _config_output, _config_plugins2;
|
|
59
55
|
outputDir = ((_config_output = config.output) === null || _config_output === void 0 ? void 0 : _config_output.path) || path.resolve(process.cwd(), "dist");
|
|
60
56
|
browserPlugin = new MFBundlerPlugin(envConfig);
|
|
61
|
-
(
|
|
57
|
+
(_config_plugins2 = config.plugins) === null || _config_plugins2 === void 0 ? void 0 : _config_plugins2.push(browserPlugin);
|
|
62
58
|
}
|
|
63
59
|
patchWebpackConfig({
|
|
64
60
|
bundlerConfig: config,
|
package/dist/esm/cli/utils.js
CHANGED
|
@@ -3,7 +3,6 @@ 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
5
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
6
|
-
import { encodeName } from "@module-federation/sdk";
|
|
7
6
|
import path from "path";
|
|
8
7
|
import { bundle } from "@modern-js/node-bundle-require";
|
|
9
8
|
var defaultPath = path.resolve(process.cwd(), "module-federation.config.ts");
|
|
@@ -46,21 +45,14 @@ var getMFConfig = function() {
|
|
|
46
45
|
}();
|
|
47
46
|
var patchMFConfig = function(mfConfig, isServer) {
|
|
48
47
|
var runtimePlugins = _to_consumable_array(mfConfig.runtimePlugins || []);
|
|
49
|
-
var
|
|
50
|
-
if (!runtimePlugins.includes(
|
|
51
|
-
runtimePlugins.push(
|
|
48
|
+
var runtimePluginPath = path.resolve(__dirname, "./mfRuntimePlugins/shared-strategy.js");
|
|
49
|
+
if (!runtimePlugins.includes(runtimePluginPath)) {
|
|
50
|
+
runtimePlugins.push(path.resolve(__dirname, "./mfRuntimePlugins/shared-strategy.js"));
|
|
52
51
|
}
|
|
53
52
|
if (isServer) {
|
|
54
|
-
var
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
if (!runtimePlugins.includes(nodeHmrPluginPath)) {
|
|
58
|
-
runtimePlugins.push(nodeHmrPluginPath);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
var injectNodeFetchRuntimePluginPath = path.resolve(__dirname, "./mfRuntimePlugins/inject-node-fetch.js");
|
|
62
|
-
if (!runtimePlugins.includes(injectNodeFetchRuntimePluginPath)) {
|
|
63
|
-
runtimePlugins.push(injectNodeFetchRuntimePluginPath);
|
|
53
|
+
var nodeHmrPluginPath = require.resolve("@module-federation/node/record-dynamic-remote-entry-hash-plugin");
|
|
54
|
+
if (!runtimePlugins.includes(nodeHmrPluginPath)) {
|
|
55
|
+
runtimePlugins.push(nodeHmrPluginPath);
|
|
64
56
|
}
|
|
65
57
|
}
|
|
66
58
|
if (typeof mfConfig.async === "undefined") {
|
|
@@ -110,7 +102,7 @@ function patchWebpackConfig(options) {
|
|
|
110
102
|
var uniqueName = mfConfig.name || (output === null || output === void 0 ? void 0 : output.uniqueName);
|
|
111
103
|
var chunkFileName = output === null || output === void 0 ? void 0 : output.chunkFilename;
|
|
112
104
|
if (output && typeof chunkFileName === "string" && uniqueName && !chunkFileName.includes(uniqueName)) {
|
|
113
|
-
var suffix = "
|
|
105
|
+
var suffix = "-[chunkhash].js";
|
|
114
106
|
output.chunkFilename = chunkFileName.replace(".js", suffix);
|
|
115
107
|
}
|
|
116
108
|
}
|
|
@@ -2,7 +2,7 @@ import path from "path";
|
|
|
2
2
|
import { fs } from "@modern-js/utils";
|
|
3
3
|
import { ModuleFederationPlugin as WebpackModuleFederationPlugin, AsyncBoundaryPlugin } from "@module-federation/enhanced";
|
|
4
4
|
import { ModuleFederationPlugin as RspackModuleFederationPlugin } from "@module-federation/enhanced/rspack";
|
|
5
|
-
import { StreamingTargetPlugin
|
|
5
|
+
import { StreamingTargetPlugin } from "@module-federation/node";
|
|
6
6
|
import { getMFConfig, getTargetEnvConfig, patchWebpackConfig } from "./utils";
|
|
7
7
|
import { updateStatsAndManifest } from "./manifest";
|
|
8
8
|
import { MODERN_JS_SERVER_DIR } from "../constant";
|
|
@@ -16,15 +16,15 @@ const moduleFederationPlugin = (userConfig = {}) => ({
|
|
|
16
16
|
const enableSSR = Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
|
|
17
17
|
const mfConfig = await getMFConfig(userConfig);
|
|
18
18
|
let outputDir = "";
|
|
19
|
+
const bundlerType = useAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
|
|
20
|
+
const WebpackPluginConstructor = userConfig.webpackPluginImplementation || WebpackModuleFederationPlugin;
|
|
21
|
+
const RspackPluginConstructor = userConfig.webpackPluginImplementation || RspackModuleFederationPlugin;
|
|
22
|
+
const MFBundlerPlugin = bundlerType === "rspack" ? RspackPluginConstructor : WebpackPluginConstructor;
|
|
19
23
|
let browserPlugin;
|
|
20
24
|
let nodePlugin;
|
|
21
25
|
return {
|
|
22
26
|
config: () => {
|
|
23
27
|
var _modernjsConfig_dev;
|
|
24
|
-
const bundlerType = useAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
|
|
25
|
-
const WebpackPluginConstructor = userConfig.webpackPluginImplementation || WebpackModuleFederationPlugin;
|
|
26
|
-
const RspackPluginConstructor = userConfig.rspackPluginImplementation || RspackModuleFederationPlugin;
|
|
27
|
-
const MFBundlerPlugin = bundlerType === "rspack" ? RspackPluginConstructor : WebpackPluginConstructor;
|
|
28
28
|
if (enableSSR) {
|
|
29
29
|
process.env["MF_DISABLE_EMIT_STATS"] = "true";
|
|
30
30
|
process.env["MF_SSR_PRJ"] = "true";
|
|
@@ -36,15 +36,11 @@ const moduleFederationPlugin = (userConfig = {}) => ({
|
|
|
36
36
|
nodePlugin = new MFBundlerPlugin(envConfig);
|
|
37
37
|
(_config_plugins = config.plugins) === null || _config_plugins === void 0 ? void 0 : _config_plugins.push(nodePlugin);
|
|
38
38
|
(_config_plugins1 = config.plugins) === null || _config_plugins1 === void 0 ? void 0 : _config_plugins1.push(new StreamingTargetPlugin(envConfig));
|
|
39
|
-
if (isDev) {
|
|
40
|
-
var _config_plugins2;
|
|
41
|
-
(_config_plugins2 = config.plugins) === null || _config_plugins2 === void 0 ? void 0 : _config_plugins2.push(new EntryChunkTrackerPlugin());
|
|
42
|
-
}
|
|
43
39
|
} else {
|
|
44
|
-
var _config_output,
|
|
40
|
+
var _config_output, _config_plugins2;
|
|
45
41
|
outputDir = ((_config_output = config.output) === null || _config_output === void 0 ? void 0 : _config_output.path) || path.resolve(process.cwd(), "dist");
|
|
46
42
|
browserPlugin = new MFBundlerPlugin(envConfig);
|
|
47
|
-
(
|
|
43
|
+
(_config_plugins2 = config.plugins) === null || _config_plugins2 === void 0 ? void 0 : _config_plugins2.push(browserPlugin);
|
|
48
44
|
}
|
|
49
45
|
patchWebpackConfig({
|
|
50
46
|
bundlerConfig: config,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { encodeName } from "@module-federation/sdk";
|
|
2
1
|
import path from "path";
|
|
3
2
|
import { bundle } from "@modern-js/node-bundle-require";
|
|
4
3
|
const defaultPath = path.resolve(process.cwd(), "module-federation.config.ts");
|
|
@@ -16,21 +15,14 @@ const patchMFConfig = (mfConfig, isServer) => {
|
|
|
16
15
|
const runtimePlugins = [
|
|
17
16
|
...mfConfig.runtimePlugins || []
|
|
18
17
|
];
|
|
19
|
-
const
|
|
20
|
-
if (!runtimePlugins.includes(
|
|
21
|
-
runtimePlugins.push(
|
|
18
|
+
const runtimePluginPath = path.resolve(__dirname, "./mfRuntimePlugins/shared-strategy.js");
|
|
19
|
+
if (!runtimePlugins.includes(runtimePluginPath)) {
|
|
20
|
+
runtimePlugins.push(path.resolve(__dirname, "./mfRuntimePlugins/shared-strategy.js"));
|
|
22
21
|
}
|
|
23
22
|
if (isServer) {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
if (!runtimePlugins.includes(nodeHmrPluginPath)) {
|
|
28
|
-
runtimePlugins.push(nodeHmrPluginPath);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const injectNodeFetchRuntimePluginPath = path.resolve(__dirname, "./mfRuntimePlugins/inject-node-fetch.js");
|
|
32
|
-
if (!runtimePlugins.includes(injectNodeFetchRuntimePluginPath)) {
|
|
33
|
-
runtimePlugins.push(injectNodeFetchRuntimePluginPath);
|
|
23
|
+
const nodeHmrPluginPath = require.resolve("@module-federation/node/record-dynamic-remote-entry-hash-plugin");
|
|
24
|
+
if (!runtimePlugins.includes(nodeHmrPluginPath)) {
|
|
25
|
+
runtimePlugins.push(nodeHmrPluginPath);
|
|
34
26
|
}
|
|
35
27
|
}
|
|
36
28
|
if (typeof mfConfig.async === "undefined") {
|
|
@@ -84,7 +76,7 @@ function patchWebpackConfig(options) {
|
|
|
84
76
|
const uniqueName = mfConfig.name || (output === null || output === void 0 ? void 0 : output.uniqueName);
|
|
85
77
|
const chunkFileName = output === null || output === void 0 ? void 0 : output.chunkFilename;
|
|
86
78
|
if (output && typeof chunkFileName === "string" && uniqueName && !chunkFileName.includes(uniqueName)) {
|
|
87
|
-
const suffix =
|
|
79
|
+
const suffix = `-[chunkhash].js`;
|
|
88
80
|
output.chunkFilename = chunkFileName.replace(".js", suffix);
|
|
89
81
|
}
|
|
90
82
|
}
|
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-20240521123600",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -45,10 +45,9 @@
|
|
|
45
45
|
"@swc/helpers": "0.5.3",
|
|
46
46
|
"@modern-js/utils": "^2.49.2",
|
|
47
47
|
"@modern-js/node-bundle-require": "^2.49.2",
|
|
48
|
-
"
|
|
49
|
-
"@module-federation/
|
|
50
|
-
"@module-federation/
|
|
51
|
-
"@module-federation/node": "0.0.0-next-20240520135817"
|
|
48
|
+
"@module-federation/sdk": "0.0.0-next-20240521123600",
|
|
49
|
+
"@module-federation/enhanced": "0.0.0-next-20240521123600",
|
|
50
|
+
"@module-federation/node": "0.0.0-next-20240521123600"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
53
|
"@modern-js/app-tools": "^2.49.2",
|
|
@@ -56,7 +55,11 @@
|
|
|
56
55
|
"@modern-js/runtime": "^2.49.2",
|
|
57
56
|
"@modern-js/module-tools": "^2.35.0",
|
|
58
57
|
"@modern-js/tsconfig": "^2.35.0",
|
|
59
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
58
|
+
"@module-federation/manifest": "0.0.0-next-20240521123600"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"react": ">=17",
|
|
62
|
+
"react-dom": ">=17"
|
|
60
63
|
},
|
|
61
64
|
"scripts": {
|
|
62
65
|
"build": "modern build"
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var inject_node_fetch_exports = {};
|
|
30
|
-
__export(inject_node_fetch_exports, {
|
|
31
|
-
default: () => inject_node_fetch_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(inject_node_fetch_exports);
|
|
34
|
-
var import_node_fetch = __toESM(require("node-fetch"));
|
|
35
|
-
const injectNodeFetchPlugin = () => ({
|
|
36
|
-
name: "inject-node-fetch-plugin",
|
|
37
|
-
beforeInit(args) {
|
|
38
|
-
if (!globalThis.fetch) {
|
|
39
|
-
globalThis.fetch = import_node_fetch.default;
|
|
40
|
-
}
|
|
41
|
-
return args;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
var inject_node_fetch_default = injectNodeFetchPlugin;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import nodeFetch from "node-fetch";
|
|
2
|
-
var injectNodeFetchPlugin = function() {
|
|
3
|
-
return {
|
|
4
|
-
name: "inject-node-fetch-plugin",
|
|
5
|
-
beforeInit: function beforeInit(args) {
|
|
6
|
-
if (!globalThis.fetch) {
|
|
7
|
-
globalThis.fetch = nodeFetch;
|
|
8
|
-
}
|
|
9
|
-
return args;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
var inject_node_fetch_default = injectNodeFetchPlugin;
|
|
14
|
-
export {
|
|
15
|
-
inject_node_fetch_default as default
|
|
16
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import nodeFetch from "node-fetch";
|
|
2
|
-
const injectNodeFetchPlugin = () => ({
|
|
3
|
-
name: "inject-node-fetch-plugin",
|
|
4
|
-
beforeInit(args) {
|
|
5
|
-
if (!globalThis.fetch) {
|
|
6
|
-
globalThis.fetch = nodeFetch;
|
|
7
|
-
}
|
|
8
|
-
return args;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var inject_node_fetch_default = injectNodeFetchPlugin;
|
|
12
|
-
export {
|
|
13
|
-
inject_node_fetch_default as default
|
|
14
|
-
};
|