unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.65k stars 341 forks source link

Autocompletion for lib components for the first time #736

Open andredewaard opened 4 months ago

andredewaard commented 4 months ago

Clear and concise description of the problem

Right now my understanding of this plugin is that it scans the whole codebase and only add the components from a resolver that are used in the components.d.ts file. But this doesn't give you autocompletion when you use the component for the first time.

Let say i want to use the PopoverTrigger component from radix-vue i first need to remember (of look up) the name of this component, use it, and let this plugin add it to components.d.ts before i get autocompletion. Would be nice to already have these files in components.d.ts so we dont need to remember it and can just start typing <Popove.... and it will autocomplete all options.

Suggested solution

Add all components from a library to components.d.ts by default.

Alternative

This does add a lot of overhead to the dev server but isn't used in production anyway.

Additional context

Or am i missing something?

Validations