Multiple routes with the same component #129
-
Is there a way to have multiple routes using the same component file? without having to copy the file to each page folder Example: I have And I don't want to have to copy the Bad solution:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Usually you would define an alias. If two routes are required, one could add an extra route with extendRoutes |
Beta Was this translation helpful? Give feedback.
-
You can try // clients/[userId].vue
<script setup lang="ts">
definePage({
component: ()=>import('../users/[userId].vue')
})
</script> |
Beta Was this translation helpful? Give feedback.
Usually you would define an alias. If two routes are required, one could add an extra route with extendRoutes