Skip to content

Commit 15929ee

Browse files
committed
refactor(@angular-devkit/build-webpack): deprecate webpack and webpack-dev-server builders
DEPRECATED: Webpack builders in build-webpack are deprecated. Use @angular/build builders instead.
1 parent 5d2d303 commit 15929ee

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

  • packages/angular_devkit/build_webpack/src/builders

packages/angular_devkit/build_webpack/src/builders/webpack-dev-server/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export type DevServerBuildOutput = BuildResult & {
2424
address: string;
2525
};
2626

27+
/**
28+
* @deprecated Part of Angular's Webpack support deprecation. Use `@angular/build` APIs instead.
29+
* Deprecated since v22.
30+
*/
2731
export function runWebpackDevServer(
2832
config: webpack.Configuration,
2933
context: BuilderContext,
@@ -136,6 +140,11 @@ const builder: Builder<WebpackDevServerBuilderSchema> = createBuilder<
136140
WebpackDevServerBuilderSchema,
137141
DevServerBuildOutput
138142
>((options, context) => {
143+
context.logger.warn(
144+
'The "@angular-devkit/build-webpack:webpack-dev-server" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
145+
'Use "@angular/build" instead.',
146+
);
147+
139148
const configPath = pathResolve(context.workspaceRoot, options.webpackConfig);
140149

141150
return from(getWebpackConfig(configPath)).pipe(

packages/angular_devkit/build_webpack/src/builders/webpack/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ export type BuildResult = BuilderOutput & {
2929
outputPath: string;
3030
};
3131

32+
/**
33+
* @deprecated Part of Angular's Webpack support deprecation. Use `@angular/build` APIs instead.
34+
* Deprecated since v22.
35+
*/
3236
export function runWebpack(
3337
config: webpack.Configuration,
3438
context: BuilderContext,
@@ -125,6 +129,11 @@ export function runWebpack(
125129

126130
const builder: Builder<WebpackBuilderSchema> = createBuilder<WebpackBuilderSchema>(
127131
(options, context) => {
132+
context.logger.warn(
133+
'The "@angular-devkit/build-webpack:webpack" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
134+
'Use "@angular/build" instead.',
135+
);
136+
128137
const configPath = pathResolve(context.workspaceRoot, options.webpackConfig);
129138

130139
return from(getWebpackConfig(configPath)).pipe(

0 commit comments

Comments
 (0)