Skip to content

Commit c5850b8

Browse files
committed
fix(entries): fix windows path
1 parent d2c21a3 commit c5850b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/entries/src/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import path from 'upath';
22

33
export function normalizeRoutePath(routePath: string) {
4-
return path.normalize('/' + routePath.replace(/\/+$/, ''));
4+
return path.normalize(
5+
'/' + routePath.replace(/^\/+/, '').replace(/\/+$/, '')
6+
);
57
}
68

79
/**

0 commit comments

Comments
 (0)