That's totally a legitimate way of doing it; you could even load the CSS from a CDN and import it in nuxt.config.js in the css: option if I'm not mistaken. In fact, it's easier in a lot of ways.
The three main reasons I chose to do it the way I did are:
For one reason or another, I like to programmatically load in only the icons I need (even though it isn't easier as such).
I've got no scientific proof here, but I'm fairly certain using only the SVG icons you need decreases the bundle size by ~20-30KB
I already was using several custom fonts in the project, and I didn't feel like adding another one to the mix.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can we just use font-awesome as CSS with fonts from the packages?
That's totally a legitimate way of doing it; you could even load the CSS from a CDN and import it in
nuxt.config.js
in thecss:
option if I'm not mistaken. In fact, it's easier in a lot of ways.The three main reasons I chose to do it the way I did are:
For one reason or another, I like to programmatically load in only the icons I need (even though it isn't easier as such).
I've got no scientific proof here, but I'm fairly certain using only the SVG icons you need decreases the bundle size by ~20-30KB
I already was using several custom fonts in the project, and I didn't feel like adding another one to the mix.