feat(core): add --bundler=rspack option to angular stack cnw (#30629)

## Current Behavior
There is currently no way to generate an Angular Rspack app when
creating a new Nx Workspace.

## Expected Behavior
Add support for `--bundler=rspack` in `create-nx-workspace` including
adding `Rspack` as a prompt option when asking for bundler.
This commit is contained in:
Colum Ferry 2025-04-08 13:29:20 +01:00 committed by GitHub
parent 17a543f2c4
commit 64030f55b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,7 @@ interface AngularArguments extends BaseArguments {
standaloneApi: boolean; standaloneApi: boolean;
unitTestRunner: 'none' | 'jest' | 'vitest'; unitTestRunner: 'none' | 'jest' | 'vitest';
e2eTestRunner: 'none' | 'cypress' | 'playwright'; e2eTestRunner: 'none' | 'cypress' | 'playwright';
bundler: 'webpack' | 'esbuild'; bundler: 'webpack' | 'rspack' | 'esbuild';
ssr: boolean; ssr: boolean;
serverRouting: boolean; serverRouting: boolean;
prefix: string; prefix: string;
@ -869,7 +869,7 @@ async function determineAngularOptions(
let appName: string; let appName: string;
let unitTestRunner: undefined | 'none' | 'jest' | 'vitest' = undefined; let unitTestRunner: undefined | 'none' | 'jest' | 'vitest' = undefined;
let e2eTestRunner: undefined | 'none' | 'cypress' | 'playwright' = undefined; let e2eTestRunner: undefined | 'none' | 'cypress' | 'playwright' = undefined;
let bundler: undefined | 'webpack' | 'esbuild' = undefined; let bundler: undefined | 'webpack' | 'rspack' | 'esbuild' = undefined;
let ssr: undefined | boolean = undefined; let ssr: undefined | boolean = undefined;
let serverRouting: undefined | boolean = undefined; let serverRouting: undefined | boolean = undefined;
@ -929,6 +929,10 @@ async function determineAngularOptions(
name: 'esbuild', name: 'esbuild',
message: 'esbuild [ https://esbuild.github.io/ ]', message: 'esbuild [ https://esbuild.github.io/ ]',
}, },
{
name: 'rspack',
message: 'Rspack [ https://rspack.dev/ ]',
},
{ {
name: 'webpack', name: 'webpack',
message: 'Webpack [ https://webpack.js.org/ ]', message: 'Webpack [ https://webpack.js.org/ ]',