angular/angular-cli · warning

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

Error message

The "@angular-devkit/build-webpack:webpack" builder is deprecated as part of Angular's Webpack support deprecation. Use "@angular/build" instead.

What it means

The @angular-devkit/build-webpack:webpack builder emits a deprecation warning on every execution as part of Angular's Webpack support deprecation. Users are directed to the new "@angular/build" package.

Source

Thrown at packages/angular_devkit/build_webpack/src/builders/webpack/index.ts:132

            } else {
              webpackCompiler.run(callback);
            }
          } catch (err) {
            if (err) {
              context.logger.error(
                `\nAn error occurred during the build:\n${err instanceof Error ? err.stack : err}`,
              );
            }
            throw err;
          }
        }),
    ),
  );
}

const builder: Builder<WebpackBuilderSchema> = createBuilder<WebpackBuilderSchema>(
  (options, context) => {
    context.logger.warn(
      'The "@angular-devkit/build-webpack:webpack" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
        'Use "@angular/build" instead.',
    );

    const configPath = pathResolve(context.workspaceRoot, options.webpackConfig);

    return from(getWebpackConfig(configPath)).pipe(
      switchMap((config) => runWebpack(config, context)),
    );
  },
);

export default builder;

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Migrate the build target to "@angular/build:application" (esbuild-based).
  2. Port required custom webpack behavior to supported options/plugins of the new builder.
  3. If immediate migration is impossible, accept the warning and schedule the migration before Webpack support removal.

Example fix

// before (angular.json)
"builder": "@angular-devkit/build-webpack:webpack"
// after
"builder": "@angular/build:application"
Defensive patterns

Strategy: validation

Validate before calling

const ng = require('./angular.json');
for (const [name, p] of Object.entries(ng.projects)) {
  for (const [t, target] of Object.entries(p.architect ?? p.targets ?? {})) {
    if (target.builder === '@angular-devkit/build-webpack:webpack') {
      console.warn(`${name}:${t} uses the deprecated webpack builder; migrate to @angular/build:application`);
    }
  }
}

Prevention

When it happens

Trigger: Any build target using "builder": "@angular-devkit/build-webpack:webpack" in angular.json; the warning is emitted unconditionally at the start of the builder function.

Common situations: Custom application builds with a bespoke webpack.config; older Angular CLI workspaces pinned to webpack-based builders; CI pipelines invoking these targets.

Related errors


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