Repository navigation
Auto-Import components from /components folder
#258
Closed
nathanchase
started this conversation in
Proposal
Replies: 1 comment 4 replies
|
Unplugin-auto-import is framework agnostic, wouldn't that already work for .astro ato imports? |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In Vue and Svelte, there are packages that do auto-importing of components from the projects's
/componentsfolder.Vue has:
(both of which are used by Nuxt 3)
Svelte has:
https://github.com/yuanchuan/sveltekit-autoimport
It would be a great developer experience upgrade. As long as you have no name collisions, all of your components (.astro, .vue, .svelte, etc.) from
/componentswould just be available to any Astro component. Other frameworks have an error check display in the console when such a component naming collision occurs.Ideally, this would look something like:
All reactions