Skip to content

Commit ea4b76b

Browse files
committed
fix(router): rewriteBasepath not working without trailing slash
1 parent 7771c00 commit ea4b76b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/router-core/src/rewrite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function rewriteBasepath(opts: {
2424
}) {
2525
const trimmedBasepath = trimPath(opts.basepath)
2626
const regex = new RegExp(
27-
`^/${trimmedBasepath}/`,
27+
`^/${trimmedBasepath}(?:/|$)`,
2828
opts.caseSensitive ? '' : 'i',
2929
)
3030
return {

0 commit comments

Comments
 (0)