fix(@angular/cli): skip CLI version check for migrate-only updates by maruthang · Pull Request #32942 · angular/angular-cli

added 2 commits

April 6, 2026 17:50
The dev server was ignoring the `sourceMap` configuration from angular.json,
always injecting inline source maps into all served files. This affected both
CSS (hardcoded `devSourcemap: true`) and JavaScript (prebundle transformer
hardcoded `sourcemap: true`), causing 2-3x file size inflation even when
source maps were explicitly disabled.

The fix passes the normalized `scripts` and `styles` source map settings
through to the Vite configuration, so that `css.devSourcemap` and the
prebundle transformer respect the user's `sourceMap` setting.

Closes angular#31331
When running `ng update @angular/cli --name=use-application-builder`,
the CLI would fetch and install the latest version (e.g., v20) as a
temporary CLI to perform the update, even though migrate-only mode
operates on the currently installed package version. This caused
incompatible packages to be installed (e.g., @angular/build@20 on
an Angular 18/19 project).

The fix skips the CLI version check when in migrate-only mode
(--name or --migrate-only), since migrations run against the
installed version and don't need a different CLI version.

Closes angular#30696

gemini-code-assist[bot]