mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: migration page typo (#26389)
This commit is contained in:
parent
5de7244032
commit
0fd83d2ff0
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user