Skip to content

Commit 0f604ac

Browse files
hanslfilipesilva
authored andcommitted
fix(@ngtools/webpack): report errors during codegen (#3608)
And let the build finish.
1 parent acd4589 commit 0f604ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/@ngtools/webpack/src/plugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ export class AotPlugin implements Tapable {
213213
(_: any, cb: any) => cb(null, this._lazyRoutes));
214214

215215
return callback(null, result);
216-
}).catch((err) => callback(err));
216+
}, () => callback(null))
217+
.catch(err => callback(err));
217218
});
218219
});
219220

@@ -228,9 +229,7 @@ export class AotPlugin implements Tapable {
228229
// Virtual file system.
229230
compiler.resolvers.normal.plugin('resolve', (request: any, cb?: (err?: any) => void) => {
230231
if (request.request.match(/\.ts$/)) {
231-
this.done
232-
.then(() => cb())
233-
.catch((err) => cb(err));
232+
this.done.then(() => cb(), () => cb());
234233
} else {
235234
cb();
236235
}
@@ -320,6 +319,7 @@ export class AotPlugin implements Tapable {
320319
})
321320
.then(() => cb(), (err: any) => {
322321
compilation.errors.push(err);
322+
cb();
323323
});
324324
}
325325
}

0 commit comments

Comments
 (0)