Install font awesome 5 with npm for scss usage

前端 未结 4 1666
既然无缘
既然无缘 2021-02-05 12:03

like title says, I can not install font awesome 5 with npm for scss purposes.

Trying to install version 5

Accoring to https://fontawesome.com/how-to-use/use-wi

4条回答
  •  我寻月下人不归
    2021-02-05 12:28

    My understanding of FontAwesome 5 is that they use javascript to add inline SVGs to the DOM.

    Take a look at this article: SVG with JS

    Rather than compiling an scss file, you just need to include this javascipt one: fontawesome-all.js, any icons you add to your HTML should then be converted to SVGs automatically.

提交回复
热议问题