@module-federation/modern-js 0.3.5 → 0.4.0
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.
|
@@ -35,9 +35,9 @@ __export(ssrPlugin_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(ssrPlugin_exports);
|
|
36
36
|
var import_path = __toESM(require("path"));
|
|
37
37
|
var import_utils = require("@modern-js/utils");
|
|
38
|
-
var
|
|
38
|
+
var import_webpack = require("@module-federation/enhanced/webpack");
|
|
39
39
|
var import_rspack = require("@module-federation/enhanced/rspack");
|
|
40
|
-
var
|
|
40
|
+
var import_universe_entry_chunk_tracker_plugin = __toESM(require("@module-federation/node/universe-entry-chunk-tracker-plugin"));
|
|
41
41
|
var import_manifest = require("./manifest");
|
|
42
42
|
var import_constant = require("./constant");
|
|
43
43
|
function setEnv() {
|
|
@@ -101,7 +101,7 @@ const moduleFederationSSRPlugin = (userConfig) => ({
|
|
|
101
101
|
if (isServer) {
|
|
102
102
|
if (!userConfig.nodePlugin) {
|
|
103
103
|
var _config_plugins;
|
|
104
|
-
userConfig.nodePlugin = new
|
|
104
|
+
userConfig.nodePlugin = new import_webpack.ModuleFederationPlugin(userConfig.ssrConfig);
|
|
105
105
|
(_config_plugins = config.plugins) === null || _config_plugins === void 0 ? void 0 : _config_plugins.push(userConfig.nodePlugin);
|
|
106
106
|
}
|
|
107
107
|
} else {
|
|
@@ -141,7 +141,7 @@ const moduleFederationSSRPlugin = (userConfig) => ({
|
|
|
141
141
|
if (isServer) {
|
|
142
142
|
chain.target("async-node");
|
|
143
143
|
if (import_constant.isDev) {
|
|
144
|
-
chain.plugin("UniverseEntryChunkTrackerPlugin").use(
|
|
144
|
+
chain.plugin("UniverseEntryChunkTrackerPlugin").use(import_universe_entry_chunk_tracker_plugin.default);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
if (import_constant.isDev && !isServer) {
|
|
@@ -2,9 +2,9 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { fs } from "@modern-js/utils";
|
|
5
|
-
import { ModuleFederationPlugin } from "@module-federation/enhanced";
|
|
5
|
+
import { ModuleFederationPlugin } from "@module-federation/enhanced/webpack";
|
|
6
6
|
import { ModuleFederationPlugin as RspackModuleFederationPlugin } from "@module-federation/enhanced/rspack";
|
|
7
|
-
import
|
|
7
|
+
import UniverseEntryChunkTrackerPlugin from "@module-federation/node/universe-entry-chunk-tracker-plugin";
|
|
8
8
|
import { updateStatsAndManifest } from "./manifest";
|
|
9
9
|
import { isDev } from "./constant";
|
|
10
10
|
function setEnv() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { fs } from "@modern-js/utils";
|
|
3
|
-
import { ModuleFederationPlugin } from "@module-federation/enhanced";
|
|
3
|
+
import { ModuleFederationPlugin } from "@module-federation/enhanced/webpack";
|
|
4
4
|
import { ModuleFederationPlugin as RspackModuleFederationPlugin } from "@module-federation/enhanced/rspack";
|
|
5
|
-
import
|
|
5
|
+
import UniverseEntryChunkTrackerPlugin from "@module-federation/node/universe-entry-chunk-tracker-plugin";
|
|
6
6
|
import { updateStatsAndManifest } from "./manifest";
|
|
7
7
|
import { isDev } from "./constant";
|
|
8
8
|
function setEnv() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/modern-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@swc/helpers": "0.5.
|
|
58
|
+
"@swc/helpers": "0.5.12",
|
|
59
59
|
"@modern-js/utils": "2.54.2",
|
|
60
60
|
"@modern-js/node-bundle-require": "2.54.2",
|
|
61
61
|
"node-fetch": "~3.3.0",
|
|
62
62
|
"react-error-boundary": "4.0.13",
|
|
63
63
|
"hoist-non-react-statics": "3.3.2",
|
|
64
|
-
"@module-federation/sdk": "0.
|
|
65
|
-
"@module-federation/enhanced": "0.
|
|
66
|
-
"@module-federation/node": "2.5.
|
|
64
|
+
"@module-federation/sdk": "0.4.0",
|
|
65
|
+
"@module-federation/enhanced": "0.4.0",
|
|
66
|
+
"@module-federation/node": "2.5.6"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/hoist-non-react-statics": "3.3.2",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@modern-js/runtime": "2.57.0",
|
|
73
73
|
"@modern-js/module-tools": "2.57.0",
|
|
74
74
|
"@modern-js/tsconfig": "2.57.0",
|
|
75
|
-
"@module-federation/manifest": "0.
|
|
75
|
+
"@module-federation/manifest": "0.4.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": ">=17",
|