Feature request: Custom icon from file
Have you try to use also unplugin-icons with this module?
I was planning to create a feature request that is similar to @HigherOrderLogic issue, as the need to wrap custom icons in vue components is not that intuitive. I think if we could change it to work as nuxt-icons module, which is the most intuitive way and the most similar to nuxt terminology in my opinion, it would be more enjoyable to use.
I forgot about nuxt-icons which is a great module. I also like the idea a lot, I usually create a Vue file with the SVG inside the <template> then I directly use the component name in <Icon name="MyCustomSVGIcon" />.
One thing which is bothering my here is about this import: https://github.com/gitFoxCode/nuxt-icons/blob/main/src/runtime/components/nuxt-icon.vue#L7
I am afraid that it might be quite big if it includes a lot of svg icons and is not leveraging tree-shaking.
This issue could be a solution, with this, I would love to find a way to merge those two packages together. WDYT @gitFoxCode ?
+1 This feature will make this the go-to module for icons
+1 This feature will make this the go-to module for icons
+1 As well, being able to to fetch icons on demand from the iconify framework and using custom local icons (assets/icons for example), would be essentially the complete and go-to package.
+1 As well, being able to to fetch icons on demand from the iconify framework and using custom local icons (assets/icons for example), would be essentially the complete and go-to package.
excatly. You can have a better DX by using unplugin icons with the module but it requires some config. Having these features out of the box would make our lifes better
Planned but will be after 3.0 release
Planned but will be after 3.0 release
This is great. Thanks for the amazing work from you and the whole team
Thank you for trusting us!
This issue could be a solution, with this, I would love to find a way to merge those two packages together. WDYT @gitFoxCode ?
Hi, sorry for the delay but the overlap of responsibilities at work and college do not allow me to deal with projects as I would like. I care about easy addition of icons to the site, you can combine the two modules into one. What I would like most is that the icons are imported only if they are used, so as not to serve the user a thousand icons where only three are used on a given page. This type of module in general should be part of the core of nuxt itself, after all, every website uses icons. The nuxt-icons module itself is in the plans to be rebuilt, I'm limited by the Vite architecture, to make it so that it would be best for the end user I'd have to really dig deep into what's going on underneath the engine - I'm not at the level of experience as the nuxt-lab programmers who could handle this with due respect. The ability to configure a particular folder, icons on demand, etc.
i think that using @Atinux modules with unplugin-icons is a great addition or maybe a way to be able to use custom local json files ?
any update on this?
I know how to do it but sadly I have more important stuff to do at the moment.
Help is more than welcome though <3
any update on this?
I created module for working with local icons (color and monotone) with nuxt-icon or any iconify module. https://github.com/adinvadim/nuxt-local-iconify
The new version of nuxt-icon should support custom icon, see https://github.com/nuxt-modules/icon/releases/tag/v1.0.0-beta.1