ktsn/vue-auto-routing

Not supported index.vue auto routing in nested routing?

potato4d opened this issue · 2 comments

About

vue-auto-routing resolves Vue Router routing automatically by using vue-route-generator. The routes are generated with the same rules with Nuxt routing.

It is written as routing similar to Nuxt.js, but it seems there is behavior that is not so.

Nuxt.js

In the case of the following files

/pages/posts/index.vue
/pages/posts/_id.vue

It corresponds to the following.

/posts    -> /pages/posts/index.vue
/posts/   -> /pages/posts/index.vue
/posts/1 -> /pages/posts/_id.vue

vue-auto-routing

In the case of the following files

/pages/posts/index.vue
/pages/posts/_id.vue

It corresponds to the following.

/posts    -> /pages/posts/_id.vue
/posts/   -> /pages/posts/_id.vue
/posts/1 -> /pages/posts/_id.vue

Screenshots

Image from Gyazo

Refs

Repo: https://github.com/magitek-telescope/vue-auto-routing-bug-20181015

ktsn commented

Thanks for filing the issue.
I just fixed this on vue-route-generator v0.3.2 which is one of the dependencies of vue-auto-routing. Please update it on your project. The easiest way to do that would like:

$ npm r vue-auto-routing
$ npm i -D vue-auto-routing

thanks.
I appreciate your improvement!