Skip to content

build: migrate to @angular/build builders, drop @angular-devkit/build-angular#507

Merged
almothafar merged 1 commit into
ng2-ui:masterfrom
almothafar:chore/migrate-angular-build-builders
Jun 7, 2026
Merged

build: migrate to @angular/build builders, drop @angular-devkit/build-angular#507
almothafar merged 1 commit into
ng2-ui:masterfrom
almothafar:chore/migrate-angular-build-builders

Conversation

@almothafar

Copy link
Copy Markdown
Collaborator

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:..." instead warning shown on ng 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-angular framework entry and the require('@angular-devkit/build-angular/plugins/karma') plugin. The new @angular/build:karma builder registers its framework/plugins itself (it even filters the old framework name out).
  • package.json — replaced @angular-devkit/build-angular with @angular/build (^22.0.0).

Why it's worth it

Removing @angular-devkit/build-angular drops the whole legacy Webpack toolchain:

  • ~370 fewer installed packages
  • 0 audit vulnerabilities (was 4 moderate)
  • No more deprecation warnings on serve/test/build

Build output is unchanged (the :application/:dev-server builders 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-complete16/16
  • npx ng test demo5/5
  • npm run lint
  • npm run format:check
  • npm audit0 vulnerabilities

🤖 Generated with Claude Code

…-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>
@almothafar almothafar merged commit e218b3e into ng2-ui:master Jun 7, 2026
2 checks passed
@almothafar almothafar deleted the chore/migrate-angular-build-builders branch June 7, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant