André Figueira

Systems engineer - I write apps, I make websites, opinions are my own...

Install Fontawesome using NPM and Laravel Mix

To install Font Awesome and use the Laravel mix plugin run the following;

npm i --save @fortawesome/fontawesome-free

Once done, import the SCSS files into your SCSS main file as follows;

@import '~@fortawesome/fontawesome-free/scss/brands';
@import '~@fortawesome/fontawesome-free/scss/regular';
@import '~@fortawesome/fontawesome-free/scss/solid';
@import '~@fortawesome/fontawesome-free/scss/fontawesome';

Finally compile your assets, usually with npm run dev if you're running a Laravel project.