From cf804f22e41ceef834c3bd47cde3ceb7f1298be7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 26 Jun 2018 14:24:57 -0400 Subject: [PATCH] Do not return files with errors from ImportScanner#getOutputFiles. This works whether or not the file object is a JsOutputResource. --- tools/isobuild/import-scanner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 523274d9fe..78b93be71e 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -671,6 +671,7 @@ export default class ImportScanner { return this.outputFiles.filter(file => { return file.absModuleId && ! file[fakeSymbol] && + ! file.hasErrors && (! file.lazy || file.imported === true || file.imported === "dynamic"); @@ -820,6 +821,7 @@ export default class ImportScanner { if (file.reportPendingErrors && file.reportPendingErrors() > 0) { + file.hasErrors = true; // Any errors reported to InputFile#error were saved but not // reported at compilation time. Now that we know the file has been // imported, it's time to report those errors.