Skip to content

Commit a098b54

Browse files
committed
Also cleanup leading ./
1 parent 0c1b81c commit a098b54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/path.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ namespace ts {
556556
if (!relativePathSegmentRegExp.test(path)) {
557557
return path;
558558
}
559-
// Some paths only require cleanup of `/./`
560-
const simplified = path.replace(/\/\.\//g, "/");
559+
// Some paths only require cleanup of `/./` or leading `./`
560+
const simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, "");
561561
if (simplified !== path) {
562562
path = simplified;
563563
if (!relativePathSegmentRegExp.test(path)) {

0 commit comments

Comments
 (0)