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

Support all component included via component hooks at ComponentGraph #192

Closed
Maiquu opened this issue Apr 19, 2023 · 5 comments
Closed

Support all component included via component hooks at ComponentGraph #192

Maiquu opened this issue Apr 19, 2023 · 5 comments
Assignees

Comments

@Maiquu
Copy link

Maiquu commented Apr 19, 2023

Currently ComponentGraph will only show components that are defined in files with .vue extension. But some (or most) Vue UI library distributions (ex. element-plus, quasar) contain their component definitions in .js files.

Is it possible to support viewing these components in ComponentGraph as well?

@antfu
Copy link
Member

antfu commented Apr 20, 2023

Can you give a minimal example project setup so we could take a look? Thanks

@Maiquu
Copy link
Author

Maiquu commented Apr 20, 2023

Added related screenshots to README.md

https://github.com/Maiquu/nuxt-devtools-issue-setup

@Maiquu
Copy link
Author

Maiquu commented May 4, 2023

To be more precise, the code at vite-inspect integration only includes files that end with .vue extension. My request was for components added via components:extend hook to be included as well since they are not necessarily Vue SFC files.

I would gladly make a PR for this if its a reasonable enhancement.

@antfu
Copy link
Member

antfu commented May 4, 2023

I mean, yes. I think it's reasonable to have it. But I think the main blocker to me is how we could determine whether a js/ts file, or an export is a Vue component or not.

PR welcome if you have some ideas in mind. Thanks.

@Maiquu
Copy link
Author

Maiquu commented May 4, 2023

I can reduce the scope of the request to just support component files passed to nuxt via component:extends hook. Then it would probably be safe to assume they are all component files regardless of their extension.

@Maiquu Maiquu changed the title Support for non .vue files in ComponentGraph Support all component included via components:extends hook in ComponentGraph May 5, 2023
@Maiquu Maiquu changed the title Support all component included via components:extends hook in ComponentGraph Support all component included via component hooks ComponentGraph May 5, 2023
@Maiquu Maiquu changed the title Support all component included via component hooks ComponentGraph Support all component included via component hooks at ComponentGraph May 5, 2023
@antfu antfu self-assigned this May 10, 2023
@antfu antfu closed this as completed in c27f80b May 16, 2023
markthree pushed a commit to markthree/devtools that referenced this issue Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants