File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -454,9 +454,13 @@ export function createProgramAndEmit(
454454 if ( ! / \. n g ( f a c t o r y | s u m m a r y ) \. t s $ / . test ( sf . fileName ) ) {
455455 return false ;
456456 }
457- return isCompilationTarget ( bazelOpts , {
458- fileName : sf . fileName . slice ( 0 , /*'.ngfactory|ngsummary.ts'.length*/ - 13 ) + '.ts'
459- } as ts . SourceFile ) ;
457+ const base = sf . fileName . slice ( 0 , /*'.ngfactory|ngsummary.ts'.length*/ - 13 ) ;
458+ // It's possible a file was named ngsummary.ts or ngfactory.ts but *not* synthetic
459+ // So verify that base.ts or base.tsx was originally part of the compilation
460+ const tsCandidate = { fileName : `${ base } .ts` } as ts . SourceFile ;
461+ const tsxCandidate = { fileName : `${ base } .tsx` } as ts . SourceFile ;
462+ return isCompilationTarget ( bazelOpts , tsCandidate ) ||
463+ isCompilationTarget ( bazelOpts , tsxCandidate ) ;
460464 }
461465
462466 // If the Angular plugin is in use, this list of files to emit should exclude
You can’t perform that action at this time.
0 commit comments