-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component's name should be automatically generated by route.name
for keep-alive
#95
Comments
Names are already generated. You can also override them in multiple ways shown in the readme |
In my application, I must manual specify component's name use <script setup>
defineOptions({
name: '/blogs'
})
</script> but, when I update the file structure, I also need to multiple update component's name. |
aah, usually vue already generates the name of the component based on the filename, if you want to do something different, I believe this should be declared locally, in each component. If you want, you can create your own vite plugin to automatically generate this part for you but keep in mind this problem is simple for common cases but gets more complicated with others (already declared |
Description
It was inspired by vuejs/core#4993
I want to create a new plugin to implement it for this I need to export the 'getRouteMap' api.
Or implement it directly in the current plugin. like this: hannoeru/vite-plugin-pages#323 .
What do you think?
The text was updated successfully, but these errors were encountered: