angular/angular-cli · warning

The "@angular-devkit/build-angular:browser" builder is depre

Error message

The "@angular-devkit/build-angular:browser" builder is deprecated as part of Angular's Webpack support deprecation. Use "@angular/build:application" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.

What it means

Deprecation warning printed at the start of every run of the Webpack-based '@angular-devkit/build-angular:browser' builder. Angular is deprecating Webpack support; the builder still works but is slated for removal. It directs users to the esbuild-based '@angular/build:application' builder.

Source

Thrown at packages/angular_devkit/build_angular/src/builders/browser/index.ts:132

/**
 * @experimental Direct usage of this function is considered experimental.
 */
export function buildWebpackBrowser(
  options: BrowserBuilderSchema,
  context: BuilderContext,
  transforms: {
    webpackConfiguration?: ExecutionTransformer<webpack.Configuration>;
    logging?: WebpackLoggingCallback;
    indexHtml?: IndexHtmlTransform;
  } = {},
): Observable<BrowserBuilderOutput> {
  const projectName = context.target?.project;
  if (!projectName) {
    throw new Error('The builder requires a target.');
  }

  context.logger.warn(
    'The "@angular-devkit/build-angular:browser" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
      'Use "@angular/build:application" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.',
  );

  const baseOutputPath = path.resolve(context.workspaceRoot, options.outputPath);
  let outputPaths: undefined | Map<string, string>;

  // Check Angular version.
  assertCompatibleAngularVersion(context.workspaceRoot);

  return from(context.getProjectMetadata(projectName)).pipe(
    switchMap(async (projectMetadata) => {
      // Purge old build disk cache.
      await purgeStaleBuildCache(context);

      // Initialize builder
      const initialization = await initialize(options, context, transforms.webpackConfiguration);

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Change the target builder to '@angular/build:application' in angular.json.
  2. Run `ng update` (e.g. `ng update @angular/cli`) which can perform the build-system migration automatically.
  3. If migration must be deferred, suppress/acknowledge the warning and plan for removal in a future major version.
  4. Adjust removed options after migration (vendorChunk/commonChunk are no longer configurable).

Example fix

// angular.json before
"builder": "@angular-devkit/build-angular:browser",
"options": { "main": "src/main.ts", "vendorChunk": true }
// after
"builder": "@angular/build:application",
"options": { "browser": "src/main.ts" }
Defensive patterns

Strategy: validation

Validate before calling

const builder = target.builder;
if (builder === '@angular-devkit/build-angular:browser') {
  console.warn('Deprecated Webpack builder in use; migrate to @angular/build:application.');
}

Type guard

function isWebpackBrowserBuilder(t: { builder: string }): boolean {
  return t.builder === '@angular-devkit/build-angular:browser';
}

Prevention

When it happens

Trigger: Any invocation of `ng build` (or architect scheduleTarget) against a target whose builder is '@angular-devkit/build-angular:browser'.

Common situations: Projects not yet migrated during the Angular 17-19 upgrade path; CI logs filling with deprecation warnings; teams pinned to Webpack-specific options (vendorChunk, commonChunk, lazy modules).

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/61fe4ba13a3320e6. Report an issue: GitHub.