How to make Font awesome 5 work with webpack

前端 未结 7 1642
野性不改
野性不改 2021-01-30 16:33

I\'m trying to use Fontawesome in my Flask/webpack project.

The craziest thing is some point it worked then stopped, I changed something stupid, it worked again and fina

7条回答
  •  一个人的身影
    2021-01-30 17:35

    I am using the pro version, which is essentially the same in terms of usage, the ending of the name is '-pro' instead of '-free'.

    I am importing the font awesome all.js file into my index.js file:

    import '@fortawesome/fontawesome-pro/js/all.js'
    

    And importing the css into my index.scss file:

    @import '~@fortawesome/fontawesome-pro/css/all.css';
    

提交回复
热议问题