N
Nuxt5mo ago
kb

Make Nuxt Icon <Icon> a global component?

Hi, we are using nuxt 3, and im using the NuxtIcon module https://nuxt.com/modules/icon - but right now we dont have our components auto importing, so i wondered how can I make it so I dont need to do import { Icon } from '#components' in every component?
2 Replies
kb
kbOP5mo ago
I don't think I can do .global.vue naming trick because the component is from a package right? actually, I just removed my import line and its still working, so now im even more confused lol.
awacode
awacode4mo ago
its already globally available in nuxt as it is a nuxt module. Apart from that Nuxt already auto imports everything under components, composables, etc. ..are you also using histoire? If so, how do you get it running with nuxt icon? i have a problem here
Want results from more Discord servers?
Add your server