Skip to content

Commit

Permalink
fix: fix Windows file path
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-rayqiu committed Feb 27, 2024
1 parent bdd4218 commit 2fb8f07
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ export default class TSConfigPathIndexer {
if (!this.isOnCore()) {
return; // no-op if this is not a Core workspace
}
const filePath = URI.file(document.uri).fsPath;
// replace Windows file separator
const filePath = path.normalize(URI.file(document.uri).fsPath).replace(/\\/g, '/');
this.addNewPathMapping(filePath);
const moduleName = this.getModuleName(filePath);
const projectRoot = this.getProjectRoot(filePath);
Expand Down

0 comments on commit 2fb8f07

Please sign in to comment.