@nx/module-federation 21.4.0 → 21.5.0-beta.1

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",
4
+ "version": "21.5.0-beta.1",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -25,11 +25,11 @@
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
27
  "tslib": "^2.3.0",
28
- "@nx/devkit": "21.4.0",
29
- "@nx/js": "21.4.0",
30
- "@nx/web": "21.4.0",
28
+ "@nx/devkit": "21.5.0-beta.1",
29
+ "@nx/js": "21.5.0-beta.1",
30
+ "@nx/web": "21.5.0-beta.1",
31
31
  "picocolors": "^1.1.0",
32
- "webpack": "^5.88.0",
32
+ "webpack": "^5.101.3",
33
33
  "@rspack/core": "^1.3.8",
34
34
  "@module-federation/enhanced": "^0.18.0",
35
35
  "@module-federation/node": "^2.7.11",
@@ -38,7 +38,7 @@
38
38
  "http-proxy-middleware": "^3.0.5"
39
39
  },
40
40
  "devDependencies": {
41
- "nx": "21.4.0"
41
+ "nx": "21.5.0-beta.1"
42
42
  },
43
43
  "nx-migrations": {
44
44
  "migrations": "./migrations.json"
@@ -1 +1 @@
1
- {"version":3,"file":"nx-module-federation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/module-federation/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,uBAAuB,CAAC;AAI/B,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc,CAAC;gBAJf,QAAQ,EAAE;QAChB,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,EACO,cAAc,CAAC,EAAE,gCAAgC;IAG3D,KAAK,CAAC,QAAQ,EAAE,QAAQ;CA2EzB"}
1
+ {"version":3,"file":"nx-module-federation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/module-federation/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,uBAAuB,CAAC;AAI/B,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc,CAAC;gBAJf,QAAQ,EAAE;QAChB,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,EACO,cAAc,CAAC,EAAE,gCAAgC;IAG3D,KAAK,CAAC,QAAQ,EAAE,QAAQ;CA0EzB"}
@@ -66,7 +66,6 @@ class NxModuleFederationPlugin {
66
66
  : {}),
67
67
  ...(this.configOverride ? this.configOverride : {}),
68
68
  runtimePlugins,
69
- virtualRuntimeEntry: true,
70
69
  }).apply(compiler);
71
70
  if (sharedLibraries) {
72
71
  sharedLibraries.getReplacementPlugin().apply(compiler);
@@ -1 +1 @@
1
- {"version":3,"file":"nx-module-federation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/module-federation/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,uBAAuB,CAAC;AAI/B,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc,CAAC;gBAJf,QAAQ,EAAE;QAChB,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,EACO,cAAc,CAAC,EAAE,gCAAgC;IAG3D,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAoEzB"}
1
+ {"version":3,"file":"nx-module-federation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/module-federation/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,uBAAuB,CAAC;AAI/B,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc,CAAC;gBAJf,QAAQ,EAAE;QAChB,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,EACO,cAAc,CAAC,EAAE,gCAAgC;IAG3D,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAmEzB"}
@@ -63,7 +63,6 @@ class NxModuleFederationPlugin {
63
63
  : {}),
64
64
  ...(this.configOverride ? this.configOverride : {}),
65
65
  runtimePlugins,
66
- virtualRuntimeEntry: true,
67
66
  }).apply(compiler);
68
67
  if (sharedLibraries) {
69
68
  sharedLibraries.getReplacementPlugin().apply(compiler);
@@ -1 +1 @@
1
- {"version":3,"file":"with-module-federation-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/angular/with-module-federation-ssr.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACtC,MAAM,aAAa,CAAC;AAGrB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,iCAyFlD"}
1
+ {"version":3,"file":"with-module-federation-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/angular/with-module-federation-ssr.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACtC,MAAM,aAAa,CAAC;AAGrB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,iCAwFlD"}
@@ -66,7 +66,6 @@ async function withModuleFederationForSSR(options, configOverride) {
66
66
  ...(configOverride?.runtimePlugins ?? []),
67
67
  require.resolve('@module-federation/node/runtimePlugin'),
68
68
  ],
69
- virtualRuntimeEntry: true,
70
69
  }, {}),
71
70
  sharedLibraries.getReplacementPlugin(),
72
71
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"with-module-federation.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/angular/with-module-federation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACtC,MAAM,aAAa,CAAC;AAIrB,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,iCA+ElD"}
1
+ {"version":3,"file":"with-module-federation.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/angular/with-module-federation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACtC,MAAM,aAAa,CAAC;AAIrB,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,iCAkFlD"}
@@ -8,6 +8,10 @@ async function withModuleFederation(options, configOverride) {
8
8
  if (global.NX_GRAPH_CREATION) {
9
9
  return (config) => config;
10
10
  }
11
+ // This is required to ensure that the webpack version used by the Angular CLI is used
12
+ process.env['FEDERATION_WEBPACK_PATH'] = require.resolve('webpack', {
13
+ paths: [require.resolve('@angular-devkit/build-angular')],
14
+ });
11
15
  const isDevServer = process.env['WEBPACK_SERVE'];
12
16
  const { sharedLibraries, sharedDependencies, mappedRemotes } = await (0, utils_2.getModuleFederationConfig)(options);
13
17
  return (config) => {
@@ -59,7 +63,6 @@ async function withModuleFederation(options, configOverride) {
59
63
  require.resolve('@nx/module-federation/src/utils/plugins/runtime-library-control.plugin.js'),
60
64
  ]
61
65
  : configOverride?.runtimePlugins,
62
- virtualRuntimeEntry: true,
63
66
  }),
64
67
  sharedLibraries.getReplacementPlugin(),
65
68
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"with-module-federation-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/rspack/with-module-federation-ssr.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAGrB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC;;WAiFlD"}
1
+ {"version":3,"file":"with-module-federation-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/rspack/with-module-federation-ssr.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAGrB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC;;WAgFlD"}
@@ -59,7 +59,6 @@ async function withModuleFederationForSSR(options, configOverride) {
59
59
  ...(configOverride?.runtimePlugins ?? []),
60
60
  require.resolve('@module-federation/node/runtimePlugin'),
61
61
  ],
62
- virtualRuntimeEntry: true,
63
62
  }, {}), sharedLibraries.getReplacementPlugin());
64
63
  // The env var is only set from the module-federation-dev-server
65
64
  // Attach the runtime plugin
@@ -1 +1 @@
1
- {"version":3,"file":"with-module-federation.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/rspack/with-module-federation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAMrB;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,oBAcvC,aAAa;;MAEpB,aAAa,EAqEjB"}
1
+ {"version":3,"file":"with-module-federation.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/rspack/with-module-federation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAMrB;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,oBAcvC,aAAa;;MAEpB,aAAa,EAoEjB"}
@@ -62,7 +62,6 @@ async function withModuleFederation(options, configOverride) {
62
62
  require.resolve('@nx/module-federation/src/utils/plugins/runtime-library-control.plugin.js'),
63
63
  ]
64
64
  : configOverride?.runtimePlugins,
65
- virtualRuntimeEntry: true,
66
65
  }), sharedLibraries.getReplacementPlugin());
67
66
  // The env var is only set from the module-federation-dev-server
68
67
  // Attach the runtime plugin
@@ -1 +1 @@
1
- {"version":3,"file":"with-module-federation-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/webpack/with-module-federation-ssr.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAIrB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,iCA2ElD"}
1
+ {"version":3,"file":"with-module-federation-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/webpack/with-module-federation-ssr.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAIrB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,iCA0ElD"}
@@ -51,7 +51,6 @@ async function withModuleFederationForSSR(options, configOverride) {
51
51
  ...(configOverride?.runtimePlugins ?? []),
52
52
  require.resolve('@module-federation/node/runtimePlugin'),
53
53
  ],
54
- virtualRuntimeEntry: true,
55
54
  }, {}), sharedLibraries.getReplacementPlugin());
56
55
  // The env var is only set from the module-federation-dev-server
57
56
  // Attach the runtime plugin
@@ -1 +1 @@
1
- {"version":3,"file":"with-module-federation.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/webpack/with-module-federation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAKrB;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,2CA4ElD"}
1
+ {"version":3,"file":"with-module-federation.d.ts","sourceRoot":"","sources":["../../../../../../packages/module-federation/src/with-module-federation/webpack/with-module-federation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEtB,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAKrB;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,sBAAsB,EAC/B,cAAc,CAAC,EAAE,gCAAgC,2CA2ElD"}
@@ -54,7 +54,6 @@ async function withModuleFederation(options, configOverride) {
54
54
  require.resolve('@nx/module-federation/src/utils/plugins/runtime-library-control.plugin.js'),
55
55
  ]
56
56
  : configOverride?.runtimePlugins,
57
- virtualRuntimeEntry: true,
58
57
  }), sharedLibraries.getReplacementPlugin());
59
58
  // The env var is only set from the module-federation-dev-server
60
59
  // Attach the runtime plugin