Skip to content

Commit 3a913d2

Browse files
filipesilvavikerman
authored andcommitted
fix(@ngtools/webpack): don't warn on extra files in errored compilations
1 parent 430e759 commit 3a913d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ export class AngularCompilerPlugin {
596596
// Only do the unused TS files checks when under Ivy
597597
// since previously we did include unused files in the compilation
598598
// See: https://github.com/angular/angular-cli/pull/15030
599-
if (!this._compilerOptions.enableIvy) {
599+
// Don't do checks for compilations with errors, since that can result in a partial compilation.
600+
if (!this._compilerOptions.enableIvy || compilation.errors.length > 0) {
600601
return;
601602
}
602603

0 commit comments

Comments
 (0)