Skip to content

Commit

Permalink
fix(@ngtools/webpack): format Ivy diagnostics properly
Browse files Browse the repository at this point in the history
By passing all diagnostics through formatDiagnostics from compiler-cli.

Without this we were printing negative TS error codes which was
compiler-cli way of marking Angular errors.
  • Loading branch information
vikerman committed Jan 2, 2020
1 parent fed8c7d commit 5dbb2a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ngtools/webpack/src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ export function reportDiagnostics(
}

if (tsErrors.length > 0) {
const message = ts.formatDiagnosticsWithColorAndContext(tsErrors, compilerHost);
const message = formatDiagnostics(tsErrors);
reportError(message);
}

if (tsWarnings.length > 0) {
const message = ts.formatDiagnosticsWithColorAndContext(tsWarnings, compilerHost);
const message = formatDiagnostics(tsWarnings);
reportWarning(message);
}

Expand Down

0 comments on commit 5dbb2a3

Please sign in to comment.