-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(angular): keep extra target metadata when needed in convert-to-rspack
generator
#31309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(angular): keep extra target metadata when needed in convert-to-rspack
generator
#31309
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
View your CI Pipeline Execution ↗ for commit 4e51933.
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes conversion issues when migrating Angular projects to Rspack by preserving extra target metadata such as custom dependsOn, outputs, and other options that would otherwise be lost. Key changes include reordering and adding new imports, consolidating target removal into a single targetsToRemove array, and enhancing the logic to selectively override or preserve build and serve target configurations.
Comments suppressed due to low confidence (1)
packages/angular/src/generators/convert-to-rspack/convert-to-rspack.ts:541
- [nitpick] The logic for overriding target inputs appears duplicated with similar patterns later in the file; extracting this into a helper function might improve readability and reduce potential maintenance issues.
buildTarget.config.inputs = [ ...buildTarget.config.inputs, { externalDependencies: ['@rspack/cli'] } ];
packages/angular/src/generators/convert-to-rspack/convert-to-rspack.ts
Outdated
Show resolved
Hide resolved
ea86e19
to
543c117
Compare
543c117
to
4e51933
Compare
…spack` generator (#31309) ## Current Behavior When converting an Angular project to use Rspack with the `@nx/angular:convert-to-rspack` generator, some target top-level options can be lost (e.g. custom `dependsOn`, `outputs`, etc.). ## Expected Behavior When converting an Angular project to use Rspack with the `@nx/angular:convert-to-rspack` generator, relevant target top-level options that wouldn't be inferred need to be kept in the converted project. (cherry picked from commit 2cf519a)
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
When converting an Angular project to use Rspack with the
@nx/angular:convert-to-rspack
generator, some target top-level options can be lost (e.g. customdependsOn
,outputs
, etc.).Expected Behavior
When converting an Angular project to use Rspack with the
@nx/angular:convert-to-rspack
generator, relevant target top-level options that wouldn't be inferred need to be kept in the converted project.Related Issue(s)
Fixes #