npm install --save @fortawesome/fontawesome-free
// or:
// also you can install Vue and React components.
npm install --save @fortawesome/vue-fontawesome
npm install --save @fortawesome/react-fontawesome
1.
// you can import the module in your js code.
import '@fortawesome/fontawesome-free/js/all.js';
2.
// if you are using Sass, you can import the module in app.scss.
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/<type>';