Skip to content

Commit

Permalink
fix(@ngtools/webpack): ensure webpack errors are actually an Error
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin committed Mar 7, 2018
1 parent d5d1d9b commit ffcc386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ export class AngularCompilerPlugin implements Tapable {
timeEnd('AngularCompilerPlugin._make');
cb();
}, (err: any) => {
compilation.errors.push(err.stack);
compilation.errors.push(err);
this.pushCompilationErrors(compilation);
timeEnd('AngularCompilerPlugin._make');
cb();
Expand Down Expand Up @@ -788,7 +788,7 @@ export class AngularCompilerPlugin implements Tapable {

if (errors.length > 0) {
const message = formatDiagnostics(errors);
this._errors.push(message);
this._errors.push(new Error(message));
}

if (warnings.length > 0) {
Expand Down

0 comments on commit ffcc386

Please sign in to comment.