build: migrate to @angular/build builders, drop @angular-devkit/build-angular#507
Merged
almothafar merged 1 commit intoJun 7, 2026
Conversation
…-angular Angular 22 deprecates the @angular-devkit/build-angular:* builder aliases (part of the Webpack wind-down) in favor of @angular/build:*. Switch all of them in angular.json (application, dev-server, ng-packagr, karma, extract-i18n) and drop the @angular-devkit/build-angular package in favor of @angular/build. The new @angular/build:karma builder registers its framework/plugin internally, so the karma.conf.js files no longer reference @angular-devkit/build-angular. Removing the legacy package drops the old Webpack toolchain: ~370 fewer installed packages and 0 audit vulnerabilities (was 4). Build output unchanged; full gate green on a clean-room install (rm node_modules + package-lock.json). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Angular 22 deprecates the
@angular-devkit/build-angular:*builder aliases (part of winding down Webpack) in favor of@angular/build:*— that's the... is deprecated as part of Angular's Webpack support deprecation. Use "@angular/build:..." insteadwarning shown onng serve/ng test.This switches all builders and drops the legacy package.
Changes
angular.json— all builders moved to@angular/build:*:application,dev-server,ng-packagr,karma,extract-i18n.karma.conf.js(both projects) — removed the@angular-devkit/build-angularframework entry and therequire('@angular-devkit/build-angular/plugins/karma')plugin. The new@angular/build:karmabuilder registers its framework/plugins itself (it even filters the old framework name out).package.json— replaced@angular-devkit/build-angularwith@angular/build(^22.0.0).Why it's worth it
Removing
@angular-devkit/build-angulardrops the whole legacy Webpack toolchain:Build output is unchanged (the
:application/:dev-serverbuilders were already esbuild/Vite under the old name).Validation
Verified on a clean-room install (
rm -rf node_modules package-lock.json && npm install):npm run build-lib:prod✅npm run build-docs✅npx ng test auto-complete→ 16/16 ✅npx ng test demo→ 5/5 ✅npm run lint✅npm run format:check✅npm audit→ 0 vulnerabilities ✅🤖 Generated with Claude Code