fix: Script Setup Does Not Populate Name Property#2703
fix: Script Setup Does Not Populate Name Property#2703incutonez wants to merge 1 commit intovuejs:mainfrom
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? |
#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