Skip to content

Commit 0fe456e

Browse files
authored
fix: should normalize to posix path (#9)
1 parent 89fd65b commit 0fe456e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ export function checkIsExclude(
1010

1111
const excludes = Array.isArray(exclude) ? exclude : [exclude];
1212

13-
return excludes.some((reg) => reg.test(path));
13+
// normalize to posix path
14+
const normalizedPath = path.replace(/\\/g, '/');
15+
16+
return excludes.some((reg) => reg.test(normalizedPath));
1417
}

0 commit comments

Comments
 (0)