@nx/module-federation 21.4.0-canary.20250815-18ba315 → 21.5.0-beta.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.
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": "21.4.0-canary.20250815-18ba315",
4
+ "version": "21.5.0-beta.0",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -25,9 +25,9 @@
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
27
  "tslib": "^2.3.0",
28
- "@nx/devkit": "21.4.0-canary.20250815-18ba315",
29
- "@nx/js": "21.4.0-canary.20250815-18ba315",
30
- "@nx/web": "21.4.0-canary.20250815-18ba315",
28
+ "@nx/devkit": "21.5.0-beta.0",
29
+ "@nx/js": "21.5.0-beta.0",
30
+ "@nx/web": "21.5.0-beta.0",
31
31
  "picocolors": "^1.1.0",
32
32
  "webpack": "^5.88.0",
33
33
  "@rspack/core": "^1.3.8",
@@ -38,7 +38,7 @@
38
38
  "http-proxy-middleware": "^3.0.5"
39
39
  },
40
40
  "devDependencies": {
41
- "nx": "21.4.0-canary.20250815-18ba315"
41
+ "nx": "21.5.0-beta.0"
42
42
  },
43
43
  "nx-migrations": {
44
44
  "migrations": "./migrations.json"
@@ -1 +1 @@
1
- {"version":3,"file":"get-remotes-for-host.d.ts","sourceRoot":"","sources":["../../../../../packages/module-federation/src/utils/get-remotes-for-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,UAAU,+BAA+B;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAqCD,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,YAAY,UA0B3B;AAoCD,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAAE,EACpB,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,+BAA+B,EACxC,kBAAkB,CAAC,EAAE,MAAM;;;;;;EAgF5B;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,OAAO,GAAG,SAAmB,OAkD1C"}
1
+ {"version":3,"file":"get-remotes-for-host.d.ts","sourceRoot":"","sources":["../../../../../packages/module-federation/src/utils/get-remotes-for-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,UAAU,+BAA+B;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAqCD,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,YAAY,UA0B3B;AAoCD,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAAE,EACpB,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,+BAA+B,EACxC,kBAAkB,CAAC,EAAE,MAAM;;;;;;EAkF5B;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,OAAO,GAAG,SAAmB,OAkD1C"}
@@ -90,11 +90,13 @@ function getRemotes(devRemotes, skipRemotes, config, context, pathToManifestFile
90
90
  const devServeRemotes = [...knownRemotes, ...knownDynamicRemotes].filter((r) => devServeApps.has(r));
91
91
  const staticDynamicRemotes = knownDynamicRemotes.filter((r) => !devServeApps.has(r));
92
92
  const remotePorts = [...devServeRemotes, ...staticDynamicRemotes].map((r) => context.projectGraph.nodes[r].data.targets['serve'].options.port);
93
- const staticRemotePort = Math.max(...[
94
- ...remotePorts,
95
- ...staticRemotes.map((r) => context.projectGraph.nodes[r].data.targets['serve'].options.port),
96
- ]) +
97
- (remotesToSkip.size + 1);
93
+ const staticRemotePort = staticRemotes.length === 0 && remotePorts.length === 0
94
+ ? undefined
95
+ : Math.max(...[
96
+ ...remotePorts,
97
+ ...staticRemotes.map((r) => context.projectGraph.nodes[r].data.targets['serve'].options.port),
98
+ ]) +
99
+ (remotesToSkip.size + 1);
98
100
  return {
99
101
  staticRemotes,
100
102
  devRemotes: devServeRemotes,