@nx/rspack 23.0.0-beta.20 → 23.0.0-beta.22

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/migrations.json CHANGED
@@ -4,13 +4,15 @@
4
4
  "cli": "nx",
5
5
  "version": "20.2.0-beta.3",
6
6
  "description": "Update the withModuleFederation import use @nx/module-federation/rspack.",
7
- "factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package"
7
+ "factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package",
8
+ "documentation": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.md"
8
9
  },
9
10
  "ensure-nx-module-federation-package": {
10
11
  "cli": "nx",
11
12
  "version": "20.3.0-beta.2",
12
13
  "description": "If workspace includes Module Federation projects, ensure the new @nx/module-federation package is installed.",
13
- "factory": "./src/migrations/update-20-3-0/ensure-nx-module-federation-package"
14
+ "factory": "./src/migrations/update-20-3-0/ensure-nx-module-federation-package",
15
+ "documentation": "./src/migrations/update-20-3-0/ensure-nx-module-federation-package.md"
14
16
  },
15
17
  "remove-deprecated-rspack-options": {
16
18
  "cli": "nx",
@@ -22,7 +24,8 @@
22
24
  "cli": "nx",
23
25
  "version": "23.0.0-beta.9",
24
26
  "description": "Updates rspack configs using React to use the new withSvgr composable function instead of the svgr option in withReact or NxReactRspackPlugin.",
25
- "factory": "./src/migrations/update-23-0-0/add-svgr-to-rspack-config"
27
+ "factory": "./src/migrations/update-23-0-0/add-svgr-to-rspack-config",
28
+ "documentation": "./src/migrations/update-23-0-0/add-svgr-to-rspack-config.md"
26
29
  }
27
30
  },
28
31
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "23.0.0-beta.20",
4
+ "version": "23.0.0-beta.22",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/devkit": "23.0.0-beta.20",
28
- "@nx/js": "23.0.0-beta.20",
29
- "@nx/module-federation": "23.0.0-beta.20",
30
- "@nx/web": "23.0.0-beta.20",
27
+ "@nx/devkit": "23.0.0-beta.22",
28
+ "@nx/js": "23.0.0-beta.22",
29
+ "@nx/module-federation": "23.0.0-beta.22",
30
+ "@nx/web": "23.0.0-beta.22",
31
31
  "@phenomnomnominal/tsquery": "~6.2.0",
32
32
  "autoprefixer": "^10.4.9",
33
33
  "browserslist": "^4.26.0",
@@ -55,8 +55,8 @@
55
55
  "webpack-node-externals": "^3.0.0"
56
56
  },
57
57
  "devDependencies": {
58
- "nx": "23.0.0-beta.20",
59
- "@nx/nest": "23.0.0-beta.20"
58
+ "nx": "23.0.0-beta.22",
59
+ "@nx/nest": "23.0.0-beta.22"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@rspack/cli": "^1.0.0",
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAarD,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAA+B,yBAAyB,CACtD,MAAM,EAAE,gCAAgC,EACxC,OAAO,EAAE,eAAe,GACvB,qBAAqB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmG/D"}
1
+ {"version":3,"file":"module-federation-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAarD,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAG5D,wBAA+B,yBAAyB,CACtD,MAAM,EAAE,gCAAgC,EACxC,OAAO,EAAE,eAAe,GACvB,qBAAqB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoG/D"}
@@ -12,7 +12,9 @@ const fs_1 = require("fs");
12
12
  const path_1 = require("path");
13
13
  const dev_server_impl_1 = tslib_1.__importDefault(require("../dev-server/dev-server.impl"));
14
14
  const lib_1 = require("./lib");
15
+ const module_federation_deprecation_1 = require("../../utils/module-federation-deprecation");
15
16
  async function* moduleFederationDevServer(schema, context) {
17
+ (0, module_federation_deprecation_1.warnRspackMfDevServerExecutorDeprecation)();
16
18
  const options = (0, lib_1.normalizeOptions)(schema);
17
19
  const currIter = options.static
18
20
  ? (0, file_server_impl_1.default)({
@@ -3,6 +3,7 @@
3
3
  "continuous": true,
4
4
  "outputCapture": "direct-nodejs",
5
5
  "title": "Rspack Module Federation Dev Server",
6
+ "x-deprecated": "The `@nx/rspack:module-federation-dev-server` executor is deprecated. Dynamic federation in `@nx/react:consumer` removes the need for host-orchestrated remote serving. Removed in Nx v24.",
6
7
  "description": "Serve a module federation application.",
7
8
  "cli": "nx",
8
9
  "type": "object",
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAYrD,OAAO,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AAE/D,wBAA+B,4BAA4B,CACzD,mBAAmB,EAAE,mCAAmC,EACxD,OAAO,EAAE,eAAe;;aAgGzB"}
1
+ {"version":3,"file":"module-federation-ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAYrD,OAAO,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AAG/D,wBAA+B,4BAA4B,CACzD,mBAAmB,EAAE,mCAAmC,EACxD,OAAO,EAAE,eAAe;;aAiGzB"}
@@ -11,7 +11,9 @@ const fs_1 = require("fs");
11
11
  const path_1 = require("path");
12
12
  const ssr_dev_server_impl_1 = tslib_1.__importDefault(require("../ssr-dev-server/ssr-dev-server.impl"));
13
13
  const lib_1 = require("./lib");
14
+ const module_federation_deprecation_1 = require("../../utils/module-federation-deprecation");
14
15
  async function* moduleFederationSsrDevServer(ssrDevServerOptions, context) {
16
+ (0, module_federation_deprecation_1.warnRspackMfSsrDevServerExecutorDeprecation)();
15
17
  const options = (0, lib_1.normalizeOptions)(ssrDevServerOptions);
16
18
  const iter = (0, ssr_dev_server_impl_1.default)(options, context);
17
19
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
@@ -3,6 +3,7 @@
3
3
  "continuous": true,
4
4
  "outputCapture": "direct-nodejs",
5
5
  "title": "Module Federation SSR Dev Server",
6
+ "x-deprecated": "The `@nx/rspack:module-federation-ssr-dev-server` executor is deprecated. SSR is not first-classed in the new `@nx/react:consumer`/`@nx/react:provider` generators. Removed in Nx v24.",
6
7
  "description": "Serve a SSR Consumer (host) application along with its known Producers (remotes).",
7
8
  "cli": "nx",
8
9
  "type": "object",
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-static-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-static-server/module-federation-static-server.impl.ts"],"names":[],"mappings":"AAaA,OAAO,EAIL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAE1F,OAAO,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAgJ9D,wBAAgB,YAAY,CAC1B,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gCAAgC,EAClD,oBAAoB,EAAE,MAAM,EAC5B,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,UAAU,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,QAmEvD;AAED,wBAA+B,4BAA4B,CACzD,MAAM,EAAE,kCAAkC,EAC1C,OAAO,EAAE,eAAe;;;aA+IzB"}
1
+ {"version":3,"file":"module-federation-static-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/module-federation-static-server/module-federation-static-server.impl.ts"],"names":[],"mappings":"AAaA,OAAO,EAIL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAE1F,OAAO,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAiJ9D,wBAAgB,YAAY,CAC1B,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gCAAgC,EAClD,oBAAoB,EAAE,MAAM,EAC5B,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,UAAU,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,QAmEvD;AAED,wBAA+B,4BAA4B,CACzD,MAAM,EAAE,kCAAkC,EAC1C,OAAO,EAAE,eAAe;;;aAgJzB"}
@@ -13,6 +13,7 @@ const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
13
13
  const child_process_1 = require("child_process");
14
14
  const fs_1 = require("fs");
15
15
  const path_1 = require("path");
16
+ const module_federation_deprecation_1 = require("../../utils/module-federation-deprecation");
16
17
  function getBuildAndServeOptionsFromServeTarget(serveTarget, context) {
17
18
  const target = (0, devkit_1.parseTargetString)(serveTarget, context);
18
19
  const serveOptions = (0, devkit_1.readTargetOptions)(target, context);
@@ -159,6 +160,7 @@ function startProxies(staticRemotesConfig, hostServeOptions, mappedLocationOfHos
159
160
  devkit_1.logger.info('NX Static host proxy started successfully');
160
161
  }
161
162
  async function* moduleFederationStaticServer(schema, context) {
163
+ (0, module_federation_deprecation_1.warnRspackMfStaticServerExecutorDeprecation)();
162
164
  // Force Node to resolve to look for the nx binary that is inside node_modules
163
165
  const nxBin = require.resolve('nx/bin/nx');
164
166
  // Get the remotes from the module federation config
@@ -3,6 +3,7 @@
3
3
  "continuous": true,
4
4
  "outputCapture": "direct-nodejs",
5
5
  "title": "Module Federation Static Dev Server",
6
+ "x-deprecated": "The `@nx/rspack:module-federation-static-server` executor is deprecated. Use `vite preview` / `rsbuild preview` via `nx:run-commands` instead. Removed in Nx v24.",
6
7
  "description": "Serve a Consumer (host) application statically along with it's Producers (remotes).",
7
8
  "cli": "nx",
8
9
  "type": "object",
@@ -0,0 +1,7 @@
1
+ export declare const RSPACK_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/rspack:module-federation-dev-server` executor is deprecated and will be removed in Nx v24. Dynamic federation in `@nx/react:consumer` removes the need for host-orchestrated remote serving. See https://nx.dev/docs/technologies/module-federation/consumer-and-provider for the v23 migration guide.";
2
+ export declare const RSPACK_MF_SSR_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/rspack:module-federation-ssr-dev-server` executor is deprecated and will be removed in Nx v24. SSR is not first-classed in the new generators; see https://nx.dev/docs/technologies/module-federation/consumer-and-provider for guidance on wiring SSR with `@nx/react:consumer`.";
3
+ export declare const RSPACK_MF_STATIC_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/rspack:module-federation-static-server` executor is deprecated and will be removed in Nx v24. Use plain `rsbuild preview` / `sirv-cli` via `nx:run-commands` if a static-serve workflow is still needed. See https://nx.dev/docs/technologies/module-federation/consumer-and-provider for details.";
4
+ export declare function warnRspackMfDevServerExecutorDeprecation(): void;
5
+ export declare function warnRspackMfSsrDevServerExecutorDeprecation(): void;
6
+ export declare function warnRspackMfStaticServerExecutorDeprecation(): void;
7
+ //# sourceMappingURL=module-federation-deprecation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-federation-deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/rspack/src/utils/module-federation-deprecation.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iDAAiD,oTAAgQ,CAAC;AAE/T,eAAO,MAAM,qDAAqD,+RAA2O,CAAC;AAE9S,eAAO,MAAM,oDAAoD,gTAAgQ,CAAC;AAUlU,wBAAgB,wCAAwC,IAAI,IAAI,CAK/D;AAED,wBAAgB,2CAA2C,IAAI,IAAI,CAKlE;AAED,wBAAgB,2CAA2C,IAAI,IAAI,CAKlE"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RSPACK_MF_STATIC_SERVER_EXECUTOR_DEPRECATION_MESSAGE = exports.RSPACK_MF_SSR_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = exports.RSPACK_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = void 0;
4
+ exports.warnRspackMfDevServerExecutorDeprecation = warnRspackMfDevServerExecutorDeprecation;
5
+ exports.warnRspackMfSsrDevServerExecutorDeprecation = warnRspackMfSsrDevServerExecutorDeprecation;
6
+ exports.warnRspackMfStaticServerExecutorDeprecation = warnRspackMfStaticServerExecutorDeprecation;
7
+ const devkit_1 = require("@nx/devkit");
8
+ // TODO(v24): Remove these MF executors. Dynamic federation in the new
9
+ // `@nx/react:consumer` generator removes the orchestration need.
10
+ const MIGRATION_URL = 'https://nx.dev/docs/technologies/module-federation/consumer-and-provider';
11
+ exports.RSPACK_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = `The \`@nx/rspack:module-federation-dev-server\` executor is deprecated and will be removed in Nx v24. Dynamic federation in \`@nx/react:consumer\` removes the need for host-orchestrated remote serving. See ${MIGRATION_URL} for the v23 migration guide.`;
12
+ exports.RSPACK_MF_SSR_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = `The \`@nx/rspack:module-federation-ssr-dev-server\` executor is deprecated and will be removed in Nx v24. SSR is not first-classed in the new generators; see ${MIGRATION_URL} for guidance on wiring SSR with \`@nx/react:consumer\`.`;
13
+ exports.RSPACK_MF_STATIC_SERVER_EXECUTOR_DEPRECATION_MESSAGE = `The \`@nx/rspack:module-federation-static-server\` executor is deprecated and will be removed in Nx v24. Use plain \`rsbuild preview\` / \`sirv-cli\` via \`nx:run-commands\` if a static-serve workflow is still needed. See ${MIGRATION_URL} for details.`;
14
+ // Executor warnings fire once per process to avoid flooding dev-server loops.
15
+ const executorWarned = new Set();
16
+ function warnOnce(key, message) {
17
+ if (executorWarned.has(key))
18
+ return;
19
+ executorWarned.add(key);
20
+ devkit_1.logger.warn(message);
21
+ }
22
+ function warnRspackMfDevServerExecutorDeprecation() {
23
+ warnOnce('rspack-mf-dev-server', exports.RSPACK_MF_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
24
+ }
25
+ function warnRspackMfSsrDevServerExecutorDeprecation() {
26
+ warnOnce('rspack-mf-ssr-dev-server', exports.RSPACK_MF_SSR_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
27
+ }
28
+ function warnRspackMfStaticServerExecutorDeprecation() {
29
+ warnOnce('rspack-mf-static-server', exports.RSPACK_MF_STATIC_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
30
+ }