fix: Script Setup Does Not Populate Name Property#2703
Conversation
✅ Deploy Preview for vuejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
I don't think this should be added because the inference is an internal mechanism. Can you clarify your use case here? |
Absolutely! I use script setup, and I need to be able to reference the name of the component programmatically... according to the docs, I should be able to use |
What are you doing with the name? |
For display purposes, retrieving it for an |
|
I have the same problem. Is there a solution? |
|
I have the same problem. Is there a solution? how about dynamic name relation with route.name? we still use vite-plugin-vue-setup-extend-plus. But which cannot deal with dynamic route related name |
#10348:
nameproperty in script setupDescription of Problem
In
script setup, thenameproperty does not get created, per here.Proposed Solution
In order to help clarify what can be used, it makes sense to add a reference to
__nameto help devs that need access to the component's name inscript setup.Additional Information
Original PR that introduced
__name