Skip to content

Commit

Permalink
fix(@ngtools/webpack): report errors during codegen (angular#3608)
Browse files Browse the repository at this point in the history
And let the build finish.
  • Loading branch information
hansl authored and filipesilva committed Dec 16, 2016
1 parent acd4589 commit 0f604ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/@ngtools/webpack/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ export class AotPlugin implements Tapable {
(_: any, cb: any) => cb(null, this._lazyRoutes));

return callback(null, result);
}).catch((err) => callback(err));
}, () => callback(null))
.catch(err => callback(err));
});
});

Expand All @@ -228,9 +229,7 @@ export class AotPlugin implements Tapable {
// Virtual file system.
compiler.resolvers.normal.plugin('resolve', (request: any, cb?: (err?: any) => void) => {
if (request.request.match(/\.ts$/)) {
this.done
.then(() => cb())
.catch((err) => cb(err));
this.done.then(() => cb(), () => cb());
} else {
cb();
}
Expand Down Expand Up @@ -320,6 +319,7 @@ export class AotPlugin implements Tapable {
})
.then(() => cb(), (err: any) => {
compilation.errors.push(err);
cb();
});
}
}

0 comments on commit 0f604ac

Please sign in to comment.