If I have both static and dynamic routes in the same level, it seems that they are included in the router based on their location in the pages
folder. However, I feel that it would be preferable if dynamic routes were included only after all static routes were pushed to the routes array so that they could both coexist in the same level.
Example:
- index
- _slug.vue
- index
- login.vue
- register.vue
(^The index/_slug
route comes first, so it is matched before the login
and register
routes.)
My current workaround is prepending the static pages with a -
so that Nuxt ignores them, and extending the Nuxt router myself to include them first. But opening this issue in case this is a behavior that should be included into the framework.