diff options
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 59fa75d77..d09df7b0f 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -609,7 +609,7 @@ delete Object.prototype.__proto__; specifier, languageVersion, _onError, - _shouldCreateNewSourceFile, + shouldCreateNewSourceFile, ) { if (logDebug) { debug( @@ -624,6 +624,10 @@ delete Object.prototype.__proto__; // Needs the original specifier specifier = normalizedToOriginalMap.get(specifier) ?? specifier; + if (shouldCreateNewSourceFile) { + sourceFileCache.delete(specifier); + } + let sourceFile = sourceFileCache.get(specifier); if (sourceFile) { return sourceFile; |