mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +08:00
refactor(@angular-devkit/build-webpack): adjust callback type to support webpack 5
This commit is contained in:
parent
b5560ebebe
commit
f6d9e858e5
@ -52,11 +52,15 @@ export function runWebpack(
|
||||
|
||||
return createWebpack(config).pipe(
|
||||
switchMap(webpackCompiler => new Observable<BuildResult>(obs => {
|
||||
const callback = (err: Error | undefined, stats: webpack.Stats) => {
|
||||
const callback = (err?: Error, stats?: webpack.Stats) => {
|
||||
if (err) {
|
||||
return obs.error(err);
|
||||
}
|
||||
|
||||
if (!stats) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Log stats.
|
||||
log(stats, config);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user