Skip to content
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

Script Setup Does Not Populate Name Property #10348

Closed
incutonez opened this issue Feb 15, 2024 · 2 comments
Closed

Script Setup Does Not Populate Name Property #10348

incutonez opened this issue Feb 15, 2024 · 2 comments

Comments

@incutonez
Copy link

incutonez commented Feb 15, 2024

Vue version

3.4.19

Link to minimal reproduction

https://play.vuejs.org/#eNp9UtuK2zAQ/ZWpKNgBYz/sW5oE2mUfUuiFto+CRWtPHG3lkdElTRv87x3JTXbpXl7M+Jy5nDmjk3g/jvUholiKVcBhNCrgRhLA6toOIzQcr5pHBP/61ukxgMcQRzCK+rUUwUvBrB5G6wLk0p2zA0hRN+kvjZDiXWo2l29ExUWtpZ3u63tviQWc0lwpWs7XBt2XMWhL3HgJmUmcMsb++pix4CJWZ7zdY/vzGfzeHxMmxVeHHt2BRVy4oFyPYaZvvn/GI8cXcrBdNJz9CvkNvTUxaZzTPkTqWPajvKx2mz3R1P/wN8eA5M9LJaEpc8r5UrBFyaqXVn+Qe1Vf5TpJE7t4tvfpBTt9yAHMBynzxRZvMtfM5Gu3fbjnCSx9spECdhWwiOvoHFLYkg+KWoRpPnbBKgq+saSmgS04VEb/QY5aRdBZCHvtK7iLAbZFB06FPToGEUgNCHcImnbInTtQ1CUNqVGHO034z5CS3eDeuWAJRVqrSMi0yGP5OfnAXfizfkZnuahHZ4+/U+plobJcwHoz25zqrcHa2L4ssgdFldvVb+0soE6T/8dubxOaJGQdlycuSUx/AR6AI9U=

Steps to reproduce

Go to the link, open the debugger, and notice that the instance does not have the name property set.

What is expected?

The instance's name property is set.

What is actually happening?

I know that __name gets set, but that's not listed in the docs as something we can use, so it seems like it's an internal, private value that we should not be using.

System Info

Firefox

Any additional comments?

I also know that I can use defineOptions to set the name, but I don't want to have to remember to do this across all my files. This seems like it might be the opposite of #6357

@yyx990803
Copy link
Member

This is expected behavior. The inferred name is added as an internal option because otherwise it would result in backwards-incompatible behavior (see 9734b31)

@incutonez
Copy link
Author

@yyx990803 if that's the case, is it possible __name could be added to the docs? Otherwise, it feels unsafe to use because it's undocumented.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants