My FontAwesome icons won't work because the $fa-font-path
variable is not taken into account while building my fontawesome.scss
file.
Step 1: I installed FontAwesome 5.13 via npm
npm install @fortawesome/fontawesome-free --save
Step 2: I edited my /scss/vendors.scss file and added the following
$fa-font-path: "../node_modules/@fortawesome/fontawesome-free/webfonts";
@import "../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss";
@import "../node_modules/@fortawesome/fontawesome-free/scss/solid.scss";
@import "../node_modules/@fortawesome/fontawesome-free/scss/regular.scss";
These seems to be the right paths, as if I make any changes I'm getting an error during the build.
Step 3: I re-built my vendor.css
./node_modules/.bin/parcel build scss/vendor.scss --no-source-maps --out-dir public/css --out-file bundle.css
Inside it seems that /
is used instead of $fa-font-path
value.
Step 4: I tried to set $fa-font-path
value in node_modules/@fortawesome/fontawesome-free/scss/_variables.scss
Same issue.