Font Awesome 5 Bundle via NPM

前端 未结 3 632
臣服心动
臣服心动 2020-12-25 14:46

I\'m trying to bundle only required Font Awesome 5 icons via webpack, but the icons are not replaced in the DOM.

  1. I\'ve added all required packages from the

3条回答
  •  灰色年华
    2020-12-25 15:25

    We just released version 5.0.2 and updated the @fortawesome NPM packages to fix a few bugs related to this. Make sure you upgrade before you try anything else.

    The missing step of the above example is to add the icon to the library:

    fontawesome.library.add(faCheck)
    

提交回复
热议问题