Skip to content

Commit cb1ea7b

Browse files
author
Andy Hanson
committed
Provide realpath for module resolution in LSHost
1 parent 6c6de2a commit cb1ea7b

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)