Skip to content

Commit 4f27f65

Browse files
author
Andy
authored
Merge pull request #10068 from Microsoft/lshost_realpath
Provide `realpath` for module resolvution in LSHost
2 parents 6c6de2a + cb1ea7b commit 4f27f65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/editorServices.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ namespace ts.server {
115115
readFile: fileName => this.host.readFile(fileName),
116116
directoryExists: directoryName => this.host.directoryExists(directoryName)
117117
};
118+
if (this.host.realpath) {
119+
this.moduleResolutionHost.realpath = path => this.host.realpath(path);
120+
}
118121
}
119122

120123
private resolveNamesWithLocalCache<T extends Timestamped & { failedLookupLocations: string[] }, R>(

0 commit comments

Comments
 (0)