tsb should handle .js suffix (#227544)

fixes https://github.com/microsoft/vscode/issues/227540
This commit is contained in:
Johannes Rieken
2024-09-04 10:36:15 +02:00
committed by GitHub
parent 638bcefe30
commit e1cc3fa181
2 changed files with 8 additions and 2 deletions

View File

@@ -660,7 +660,10 @@ class LanguageServiceHost implements ts.LanguageServiceHost {
while (!found && dirname.indexOf(stopDirname) === 0) {
dirname = path.dirname(dirname);
const resolvedPath = path.resolve(dirname, ref.fileName);
let resolvedPath = path.resolve(dirname, ref.fileName);
if (resolvedPath.endsWith('.js')) {
resolvedPath = resolvedPath.slice(0, -3);
}
const normalizedPath = normalize(resolvedPath);
if (this.getScriptSnapshot(normalizedPath + '.ts')) {