unplugin / unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup
MIT License
3.29k stars 198 forks source link

SvelteKit: Auto import src/components #154

Closed MentalGear closed 2 years ago

MentalGear commented 2 years ago

I'm struggling for how to define custom paths/folders to auto import files from. For example, using sveltekit, I would like to have all files in /components detected for importing. (I tried to use "Custom Resolvers" but it lacks a clear example - only links to a pull request.)

paulalbertdev commented 2 years ago

Don't you want this https://github.com/antfu/unplugin-vue-components ?

antfu commented 2 years ago

Auto importing for components is out-of-scope of this plugin.

MentalGear commented 2 years ago

So this only auto imports functions/vars, not component files? Would be nice, to avoid confusion, to have the scope clearly stated in the readme .