nuxt-i18n makes wrong nested routes in router.js file.

parsher
0
parsher
commented 2 months ago

Version

v5.3.0

Reproduction link

https://jsfiddle.net/boilerplate/vue

Steps to reproduce

I'm really sorry for adding the pure vue jsfiddle link.
but I need to write the issue.

The issue is from the nested directories.

I'm using nuxt-i18n 6.0.1

The nuxt-i18n can't handle more than 2 step nested directories.
it can only handle 1 step nested dirctory unlike nuxt.js

for example
home

  • my-page
    • home
      • dog
    • child

>
router.js

now :
path: "/mypage",
component: _d47506c6,
children: [ { path: 'my-page-home' …}, { path: 'my-page-home-dog' …}, {path: 'my-page-child'}]

expected
path: "/mypage",
component: _d47506c6,
children: [ { path: 'my-page', children: [ { path: 'my-page-home' …, children:[ { path: 'my-page-home-dog' …}]}, {path: 'my-page-child'} ] …},,]

What is expected ?

path: "/mypage",
component: _d47506c6,
children: [ { path: 'my-page', children: [ { path: 'my-page-home' …, children:[ { path: 'my-page-home-dog' …}]}, {path: 'my-page-child'} ] …},,]

What is actually happening?

path: "/mypage",
component: _d47506c6,
children: [ { path: 'my-page-home' …}, { path: 'my-page-home-dog' …}, {path: 'my-page-child'}]

bug
0
parsher
0
parsher
commented 2 months ago

I have closed this issue.
I found the reason why the nuxt generate only one depth children.
For using nested children in nested routes, we should make a vue file having the same name with the directory which one you want to make it in children.

ex)
/test
/test/todo.vue
/test/todo/…

0
Informations
Bug ReportOpen
#c283 - Created 2 months ago