Search code examples
font-awesomefont-awesome-5

Fontawesome 5 not displaying when using fa-solid.js


I have an issue with displaying fontawesome when using the fa-solid.js instead of fontawesome-all.js

documentation states to use fas or fa for prefix, which I do, but still, nothing is showing unless I use the all.js package.

Am I missing something?


Solution

  • OK, this is old, but I just encountered the same problem.

    What FA documentation is not telling you is how to load only one of the icon library (eg "solid").

    Solution:

    • either you load "fontawesome-all.js"
    • or you load "fa-solid.js" AND "fontawesome.js"

    (Of course, you can load the ".min" version of all of these scripts to gain some loading time.)