Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0fd83d2

Browse files
authored
docs: migration page typo (#26389)
1 parent 5de7244 commit 0fd83d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/7.migration/2.configuration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Nuxt configuration will be loaded using [`unjs/jiti`](https://github.com/unjs/ji
6767
routeNameSplitter: '/'
6868
}
6969
}
70+
```
7071

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

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

8788
updateName(route.children)
8889
}

0 commit comments

Comments
 (0)