devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Vue 3 setup components are Anonymous when imported

Open M4thG33k opened this issue 3 years ago • 3 comments

Version

6.2.1

Browser and OS info

Browser: Vivaldi 5.2.2623.48 (Stable channel) stable (64-bit) OS: Pop!_OS 22.04 LTS

Steps to reproduce

Build a library component using Vue 3, typescript, vite, and the composition api

What is expected?

Components should have their name rendered.

What is actually happening?

All imported components are Anonymous Components in dev tools.


I've noticed that all of my built components have a __name property in the options of the component definition instead of a name property, so maybe updating this line to check for options.__name would fix the issue?

I don't have a reproducible environment at the moment, but I can create one if deemed necessary to progress. Thank you!

M4thG33k avatar Sep 09 '22 19:09 M4thG33k

I'm also seeing the same problem.

jayli3n avatar Jan 24 '23 07:01 jayli3n

Are you using the setup attribute for the script?

ShinobiWPS avatar Apr 12 '23 13:04 ShinobiWPS

Are you using the setup attribute for the script?

@ShinobiWPS yep using the setup attribute.

jayli3n avatar Apr 12 '23 13:04 jayli3n