Skip to content

build: move the build and test targets to @angular/build - #3807

Open
armando-navarro wants to merge 3 commits into
angular:mainfrom
armando-navarro:d10-builders-off-webpack
Open

armando-navarro wants to merge 3 commits into
angular:mainfrom
armando-navarro:d10-builders-off-webpack

Conversation

@armando-navarro

@armando-navarro armando-navarro commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Checklist

Description

Angular CLI 22 deprecated the builders in @angular-devkit/build-angular as part of ending its webpack support, and npm run build printed that warning on every run. The build and test targets now use the @angular/build builders of the same names, which take the same options. The reasoning is in #3806.

Changes

  • angular.json: @angular/build:ng-packagr for build, @angular/build:karma for test. Options unchanged.
  • karma.conf.js: the @angular-devkit/build-angular framework and plugin entries are gone. client.args, which src/test-config.ts reads for the emulator ports, is passed through as before.
  • package.json: @angular/build replaces @angular-devkit/build-angular in the devDependencies.
  • package-lock.json: regenerated. 364 entries gone (webpack, @ngtools/webpack, babel-loader, copy-webpack-plugin and their dependencies), none added, no version changes. Regenerated with npm 10.9.9, the npm bundled with the Node 22 that CI runs: npm 11 prunes three nested @types/node entries that npm 10 requires.

Behavior to know

  • The spec bundle is built by esbuild instead of webpack.
  • The served spec bundle is written to dist/test-out/. Running npm run build (which starts with rimraf dist) while npm run test:watch is open removes it until the next rebuild.
  • The coverageIstanbulReporter block and its reporter plugin in karma.conf.js stay as they are.
  • Coverage did not run on the old builder either (karma-coverage is not installed), so nothing that worked stops working.
  • Turning coverage on takes istanbul-lib-instrument, an optional peer of @angular/build that goes with the webpack tree, plus either karma-coverage or a coverage-istanbul entry in reporters for the istanbul reporter that is already installed.

Verification

  • Build, lint, test:node (385 specs) pass. The build prints no deprecation warning.
  • Chrome 155 and Firefox 158, each through firebase-tools emulators:exec: 112 of 160 executed, 48 skipped by pending(). The spec lists matched by name on both builders.
  • The packed angular-fire-22.0.0.tgz built from the same commit with the old builder and with this one has the same SHA-1, 13a703e2d9bd0fb9ffb842ae68238b0e18cd302f, so the published package is unchanged.

Fixes #3806

Angular CLI 22 deprecated the builders in @angular-devkit/build-angular
as part of ending its webpack support, and npm run build printed that
warning on every run. The two targets now use the @angular/build
builders of the same names, which take the same options. The spec
bundle moves from webpack to esbuild. Chrome and Firefox execute the
same 160 specs with the same 48 skips, and the node specs and lint are
unchanged.

The karma.conf.js framework and plugin entries for the old package go
with it. @angular/platform-browser-dynamic stays in the root
dependencies: @angular/platform-server/testing imports it without
declaring it, and tools/jasmine.ts runs the node specs on that platform.

The regenerated lockfile loses the webpack tree, 367 entries, and with
it istanbul-lib-instrument, an optional peer of @angular/build that
only code coverage needs. Coverage was already unreachable here: the
coverage reporter is not installed on either builder.
@armando-navarro armando-navarro added comp: build/pipeline Build, bundling, packaging, release pipeline. type: chore Maintenance with no user-facing behavior change. labels Oct 23, 2026
npm 11.21 prunes the nested @types/node entries that satisfy the
optional peer of @angular/build, @angular/cli and inquirer, and npm
10.9.9, the npm bundled with the Node 22 that CI runs, then refuses
the lockfile: "Missing: @types/node@26.6.5 from lock file". Regenerated
with npm 10.9.9. npm 11 accepts the result. Against main the lockfile
now drops 364 entries, adds none, and changes no versions. The libc
metadata fields npm 11 writes are gone, which npm 10 ignores either way.
@armando-navarro armando-navarro added this to the 22.0.0-rc.0 milestone Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: build/pipeline Build, bundling, packaging, release pipeline. type: chore Maintenance with no user-facing behavior change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the repo's build and test targets off the deprecated @angular-devkit/build-angular builders

1 participant