diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 6962bd7bb04d..958ef3fb5ac2 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -1284,7 +1284,7 @@ export class AngularCompilerPlugin { allDiagnostics.push(...gatherDiagnostics(tsProgram, this._JitMode, 'AngularCompilerPlugin._emit.ts', diagMode)); - if (!hasErrors(allDiagnostics)) { + if (!this._compilerOptions.noEmitOnError || !hasErrors(allDiagnostics)) { if (this._firstRun || changedTsFiles.size > 20 || !this._hadFullJitEmit) { emitResult = tsProgram.emit( undefined,