Add Fontawesome to phoenix 1.5

Font Awesome

inside assets folder

yarn add @fortawesome/fontawesome-free

yarn add file-loader

in assets/css/ create a file called _variables.scss add the following line.

$fa-font-path: "~@fortawesome/fontawesome-free/webfonts";

import following in app.scss file.

If you dont have sass-loader inside rules, in webpack.config.js, add it now

Also while in webpack.config.js, lets configure the file-loader to load fontawesome

Add fontawesome icon in app.html.eex. and test it

<i class=”fas fa-bars”></i>

we should see this icon