3

I am trying to import font-awesome in my rails application which uses tailwind css framework.Unfortunately instead of icons square boxes show up in my application.

Steps followed:

yarn add --dev @fortawesome/fontawesome-free

application.scss
@import "@fortawesome/fontawesome-free";

I tried so many ways but not able to display icons. Can someone let me know how to resolve this?

Veda
  • 577
  • 1
  • 6
  • 22

1 Answers1

4

try this:

# application.scss
$fa-font-path: '~@fortawesome/fontawesome-free/webfonts'; 
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/regular';
@import '~@fortawesome/fontawesome-free/scss/solid';
Joel Cahalan
  • 399
  • 1
  • 11