Skip to content

Commit

Permalink
docs: migration page typo (#26389)
Browse files Browse the repository at this point in the history
  • Loading branch information
bargel committed Mar 20, 2024
1 parent 5de7244 commit 0fd83d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/7.migration/2.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Nuxt configuration will be loaded using [`unjs/jiti`](https://github.com/unjs/ji
routeNameSplitter: '/'
}
}
```

```ts [Nuxt 3]
import { createResolver } from '@nuxt/kit'
Expand All @@ -82,7 +83,7 @@ Nuxt configuration will be loaded using [`unjs/jiti`](https://github.com/unjs/ji

for (const route of routes) {
const relativePath = route.file.substring(root.length + 1)
route.name = relativePath.replace(/\//g, routeNameSplitter).slice(0, -4)
route.name = relativePath.slice(0, -4).replace(/\/index$/, '').replace(/\//g, routeNameSplitter)

updateName(route.children)
}
Expand Down

0 comments on commit 0fd83d2

Please sign in to comment.