Skip to content

Commit 9c4f9e9

Browse files
committed
fix(@ngtools/webpack): ensure webpack errors are actually an Error
1 parent 9ac1b36 commit 9c4f9e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ export class AngularCompilerPlugin {
691691
timeEnd('AngularCompilerPlugin._make');
692692
cb();
693693
}, (err: any) => {
694-
compilation.errors.push(err.stack);
694+
compilation.errors.push(err);
695695
this.pushCompilationErrors(compilation);
696696
timeEnd('AngularCompilerPlugin._make');
697697
cb();
@@ -807,7 +807,7 @@ export class AngularCompilerPlugin {
807807

808808
if (errors.length > 0) {
809809
const message = formatDiagnostics(errors);
810-
this._errors.push(message);
810+
this._errors.push(new Error(message));
811811
}
812812

813813
if (warnings.length > 0) {

0 commit comments

Comments
 (0)