JohnCampionJr / vite-plugin-vue-layouts

Vue layout plugin for Vite
MIT License
459 stars 63 forks source link

When using vite-plugin-vue-layouts with vite-plugin-pages the combination of an index route and dynamic route doesn't work #7

Closed bux closed 3 years ago

bux commented 3 years ago

A simple repro would be:

Observe how the dynamic route is being used instead of the newly created index route

Issue at vite-plugin-pages: https://github.com/hannoeru/vite-plugin-pages/issues/23

ctholho commented 3 years ago

Hi,

localhost:3000/hi/ and localhost:3000/hi are different routes. If you have an index.vue and try to navigate to localhost:3000/hi (without the trailing slash), you will find your index.vue working alright. This is expected behavior.

See e.g. this blog post about SEO implications of trailing slashes

bux commented 3 years ago

Let me make it a bit clearer:

Ref: https://github.com/hannoeru/vite-plugin-pages/issues/23#issuecomment-799980981

ctholho commented 3 years ago

Sorry. I cannot reproduce this with a new vitesse starter template and these versions: "vue-router": "^4.0.5" "vite-plugin-pages": "^0.9.0" "vite-plugin-vue-layouts": "^0.2.2"

bux commented 3 years ago

You are right. With the newest versions I don't encounter this issue anymore. I can't say though which update fixed it 😃 I'll close this issue.

CharlesOkwuagwu commented 3 years ago

The issue still remains

JohnCampionJr commented 3 years ago

Can you check with the new version from today if this is still an issue? It shouldn't be.