Open dionsnoeijen opened 3 years ago
Hi @dionsnoeijen, there is an approach you could consider to solve your need. If you use Icomoon (https://icomoon.io/app/#/select/library) you will see that Feather icons are included in their icon library. You select it and then Icomoon allows you to select which icons will be included in the final generated webfont.
The way I see it, it's a really good way to keep webfonts light and even to include custom icons. I hope this helps.
Thanks! I will try!
@Valexr As soon as I import feather, all icons are imported into js. Am I missing something obvious here?
Yep, it's not modularity... & bundled all icons in one Object...🤔
@Valexr As soon as I import feather, all icons are imported into js. Am I missing something obvious here?
Well, be sure to select only those you will use. I am talking about Icomoon app. When you touch each icon you can toggle the selection.
One more alt way:
<img src=https://unpkg.com/feather-icons@4.28.0/dist/icons/activity.svg />
<!- or ->
<img src= https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/icons/activity.svg />
& I make this file: https://gist.github.com/Valexr/6ed010b646470425d896726981c6fae1 Maybe it will be useful
I had opened an issue for this last January: #1028
In short, no, the current implementation does not support adding specific icons only in any way.
This is all I can find:
import feather from "feather-icons";
.It helps me to use
feather.replace()
in this class. But I don't want to load the whole set of icons in my js file. Can I only have the icons imported that I'm actually using?Thanks!