Answer the question
In order to leave comments, you need to log in
How to properly include Font Awesome 5 Free using Gulp 4 and SCSS?
I decided to update fontawesome in the assembly, from version 4 to 5. Everything was simple
in the four . you connect:
@import "../../../node_modules/font-awesome/scss/font-awesome";
npm install --save @fortawesome/fontawesome-free
// copy fortawesome icons
function icons_build () {
return gulp.src('node_modules/@fortawesome/fontawesome-free/webfonts/*')
.pipe(gulp.dest(path.build.fonts)); // здесь моя папка со шрифтами
}
$fa-font-path: "../fonts" !default;
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/brands";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/regular";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/solid";
@import "../../../node_modules/@fortawesome/fontawesome-free/scss/v4-shims";
.fa,.fas,.far,.fal,.fab {
font-family: "Font Awesome 5 Free";
}
<i class="fas fa-tools"></i>
&-tools-link::before {
font-family: 'Font Awesome 5 Free';
content: "\f7d9";
color: #fff;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question