Closed bux closed 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
Let me make it a bit clearer:
[...all].vue
) and not the index route (index.vue
)Ref: https://github.com/hannoeru/vite-plugin-pages/issues/23#issuecomment-799980981
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"
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.
The issue still remains
Can you check with the new version from today if this is still an issue? It shouldn't be.
A simple repro would be:
~/src/pages/hi
and call itindex.vue
<template/>
with some demo contentnpm run dev
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