Skip to content

Commit f6d9e85

Browse files
clydinmgechev
authored andcommitted
refactor(@angular-devkit/build-webpack): adjust callback type to support webpack 5
1 parent b5560eb commit f6d9e85

File tree

1 file changed

+5
-1
lines changed
  • packages/angular_devkit/build_webpack/src/webpack

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,15 @@ export function runWebpack(
5252

5353
return createWebpack(config).pipe(
5454
switchMap(webpackCompiler => new Observable<BuildResult>(obs => {
55-
const callback = (err: Error | undefined, stats: webpack.Stats) => {
55+
const callback = (err?: Error, stats?: webpack.Stats) => {
5656
if (err) {
5757
return obs.error(err);
5858
}
5959

60+
if (!stats) {
61+
return;
62+
}
63+
6064
// Log stats.
6165
log(stats, config);
6266

0 commit comments

Comments
 (0)