Skip to content

Commit ce0d1d9

Browse files
committed
fix(@ngtools/webpack): format Ivy diagnostics properly
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.
1 parent d9d233e commit ce0d1d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ngtools/webpack/src/diagnostics.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ export function reportDiagnostics(
141141
}
142142

143143
if (tsErrors.length > 0) {
144-
const message = ts.formatDiagnosticsWithColorAndContext(tsErrors, compilerHost);
144+
const message = formatDiagnostics(tsErrors);
145145
reportError(message);
146146
}
147147

148148
if (tsWarnings.length > 0) {
149-
const message = ts.formatDiagnosticsWithColorAndContext(tsWarnings, compilerHost);
149+
const message = formatDiagnostics(tsWarnings);
150150
reportWarning(message);
151151
}
152152

0 commit comments

Comments
 (0)