Skip to content

Commit 593cb78

Browse files
committed
fix(router-core): rewrite examples in RouterOptions for improved clarity
Signed-off-by: leesb971204 <[email protected]>
1 parent 23be5f9 commit 593cb78

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎packages/router-core/src/router.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,15 @@ export interface RouterOptions<
284284
* ```ts
285285
* const router = createRouter({
286286
* routeTree,
287-
* rewrite: rewriteBasepath('/basepath')
288-
* // Or wrap existing rewrite functionality
289-
* rewrite: rewriteBasepath('/basepath', {
290-
* output: ({ url }) => {...},
291-
* input: ({ url }) => {...},
292-
* })
287+
* rewrite: rewriteBasepath({ basepath: '/basepath' })
288+
* // Or compose with existing rewrite functionality
289+
* rewrite: composeRewrites([
290+
* rewriteBasepath({ basepath: '/basepath', caseSensitive: true }),
291+
* {
292+
* input: ({ url }) => {...},
293+
* output: ({ url }) => {...},
294+
* }
295+
* ])
293296
* })
294297
* ```
295298
* @default '/'

0 commit comments

Comments
 (0)