mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
tsb should handle .js suffix (#227544)
fixes https://github.com/microsoft/vscode/issues/227540
This commit is contained in:
@@ -550,7 +550,10 @@ class LanguageServiceHost {
|
||||
let found = false;
|
||||
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')) {
|
||||
this._dependencies.inertEdge(filename, normalizedPath + '.ts');
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user