How to make Font awesome 5 work with webpack

前端 未结 7 1620
野性不改
野性不改 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:36

    this worked for me

    import "@fortawesome/fontawesome-free/js/all.js";
    import "@fortawesome/fontawesome-free/css/all.css";
    

    in: app/javascript/packs/application.js

    my case: Rails 6 webpacker gem, webpack, yarn

    installed via yarn add @fortawesome/fontawesome-free

    from https://github.com/rails/webpacker/issues/619#issuecomment-590454028

    0 讨论(0)
提交回复
热议问题