docs: migration page typo (#26389)

This commit is contained in:
Serge Doda 2024-03-20 02:06:30 -07:00 committed by GitHub
parent 5de7244032
commit 0fd83d2ff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'
@ -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)
}