We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e1eb9 commit 960d9adCopy full SHA for 960d9ad
src/matcher/pathTokenizer.ts
@@ -46,17 +46,11 @@ const VALID_PARAM_RE = /[a-zA-Z0-9_]/
46
export function tokenizePath(path: string): Array<Token[]> {
47
if (!path) return [[]]
48
if (path === '/') return [[ROOT_TOKEN]]
49
- // // v3 catchAll must be renew
50
- // if (/^\/?\*/.test(path))
51
- // throw new Error(
52
- // `Catch all routes (/*) must now be defined using a parameter with a custom regex: /:catchAll(.*)`
53
- // )
54
// remove the leading slash
55
if (__DEV__ && !path.startsWith('/')) {
56
throw new Error(
57
`Route path should start with a "/": "${path}" should be "/${path}". This will break in production.`
58
)
59
- path = '/' + path
60
}
61
62
// if (tokenCache.has(path)) return tokenCache.get(path)!
0 commit comments