-
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.
Answered by
posva
Dec 26, 2022
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.
0 replies
Answer selected by
posva
-
You can try // clients/[userId].vue
<script setup lang="ts">
definePage({
component: ()=>import('../users/[userId].vue')
})
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usually you would define an alias. If two routes are required, one could add an extra route with extendRoutes