@nx/module-federation 22.4.0-canary.20260119-6bb82c0 → 22.4.0-canary.20260121-1b12e1f
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/module-federation",
|
|
3
3
|
"description": "The Nx Plugin for Module Federation contains executors and utilities that support building applications using Module Federation.",
|
|
4
|
-
"version": "22.4.0-canary.
|
|
4
|
+
"version": "22.4.0-canary.20260121-1b12e1f",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@module-federation/enhanced": "^0.21.2",
|
|
28
28
|
"@module-federation/node": "^2.7.21",
|
|
29
29
|
"@module-federation/sdk": "^0.21.2",
|
|
30
|
-
"@nx/devkit": "22.4.0-canary.
|
|
31
|
-
"@nx/js": "22.4.0-canary.
|
|
32
|
-
"@nx/web": "22.4.0-canary.
|
|
30
|
+
"@nx/devkit": "22.4.0-canary.20260121-1b12e1f",
|
|
31
|
+
"@nx/js": "22.4.0-canary.20260121-1b12e1f",
|
|
32
|
+
"@nx/web": "22.4.0-canary.20260121-1b12e1f",
|
|
33
33
|
"@rspack/core": "1.6.8",
|
|
34
34
|
"express": "^4.21.2",
|
|
35
35
|
"http-proxy-middleware": "^3.0.5",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"webpack": "^5.101.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"nx": "22.4.0-canary.
|
|
41
|
+
"nx": "22.4.0-canary.20260121-1b12e1f"
|
|
42
42
|
},
|
|
43
43
|
"nx-migrations": {
|
|
44
44
|
"migrations": "./migrations.json"
|
package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-dev-server-plugin.js
CHANGED
|
@@ -21,8 +21,10 @@ class NxModuleFederationDevServerPlugin {
|
|
|
21
21
|
if (!isDevServer) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
let initialized = false;
|
|
25
|
+
compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, async (params, callback) => {
|
|
26
|
+
if (!initialized) {
|
|
27
|
+
initialized = true;
|
|
26
28
|
const staticRemotesConfig = await this.setup();
|
|
27
29
|
devkit_1.logger.info(`NX Starting module federation dev-server for ${pc.bold(this._options.config.name)} with ${Object.keys(staticRemotesConfig).length} remotes`);
|
|
28
30
|
const mappedLocationOfRemotes = await (0, utils_1.buildStaticRemotes)(staticRemotesConfig, this._options.devServerConfig, this.nxBin);
|
|
@@ -34,8 +36,7 @@ class NxModuleFederationDevServerPlugin {
|
|
|
34
36
|
new core_1.DefinePlugin({
|
|
35
37
|
'process.env.NX_MF_DEV_REMOTES': process.env.NX_MF_DEV_REMOTES,
|
|
36
38
|
}).apply(compiler);
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
+
}
|
|
39
40
|
callback();
|
|
40
41
|
});
|
|
41
42
|
}
|
package/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-dev-server-plugin.js
CHANGED
|
@@ -21,8 +21,10 @@ class NxModuleFederationDevServerPlugin {
|
|
|
21
21
|
if (!isDevServer) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
let initialized = false;
|
|
25
|
+
compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, async (params, callback) => {
|
|
26
|
+
if (!initialized) {
|
|
27
|
+
initialized = true;
|
|
26
28
|
const staticRemotesConfig = await this.setup();
|
|
27
29
|
devkit_1.logger.info(`NX Starting module federation dev-server for ${pc.bold(this._options.config.name)} with ${Object.keys(staticRemotesConfig).length} remotes`);
|
|
28
30
|
const mappedLocationOfRemotes = await (0, utils_1.buildStaticRemotes)(staticRemotesConfig, this._options.devServerConfig, this.nxBin);
|
|
@@ -34,8 +36,7 @@ class NxModuleFederationDevServerPlugin {
|
|
|
34
36
|
new core_1.DefinePlugin({
|
|
35
37
|
'process.env.NX_MF_DEV_REMOTES': process.env.NX_MF_DEV_REMOTES,
|
|
36
38
|
}).apply(compiler);
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
+
}
|
|
39
40
|
callback();
|
|
40
41
|
});
|
|
41
42
|
}
|