We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c1b81c commit 81613f7Copy full SHA for 81613f7
1 file changed
src/compiler/path.ts
@@ -556,8 +556,8 @@ namespace ts {
556
if (!relativePathSegmentRegExp.test(path)) {
557
return path;
558
}
559
- // Some paths only require cleanup of `/./`
560
- const simplified = path.replace(/\/\.\//g, "/");
+ // Some paths only require cleanup of `/./` or leading `./`
+ const simplified = path.replace(/(?:^|\/)\.\//g, "/");
561
if (simplified !== path) {
562
path = simplified;
563
0 commit comments