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
- Migrate the build target to "@angular/build:application" (esbuild-based).
- Port required custom webpack behavior to supported options/plugins of the new builder.
- 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
- Adopt @angular/build:application for all build targets.
- Keep custom webpack needs in a migration backlog; the new builder supports most common needs natively.
- Audit angular.json builders after every Angular major upgrade.
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
- The "@angular-devkit/build-angular:app-shell" builder is dep
- Webpack stats build result is required.
- The "@angular-devkit/build-angular:browser-esbuild" builder
- The "@angular-devkit/build-angular:karma" builder is depreca
- The "@angular-devkit/build-angular:ng-packagr" builder is de
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/76adb3da7c1c1121.
Report an issue: GitHub.