wing5wong
3 months ago
1285
1
Mix

Jigsaw / Mix / Fontawesome

Posted 3 months ago by wing5wong

Having some trouble getting the fonts folder to be generated on a site im using built with Jigsaw. Unfortunately i just cant seem to figure out the fonts folder - i am under the impression this should be automatically created by webpack and not require a manual copy step within mix.

Any help is appreciated.

my compiled css file includes all the correct CSS - as i can see the following


/*!
 * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 */
@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;

my webpack.mix.js looks like so:

let mix = require('laravel-mix');
let build = require('./tasks/build.js');

mix.disableSuccessNotifications();
mix.setPublicPath(path.normalize('source/assets/build'));
mix.webpackConfig({
    plugins: [
        build.jigsaw,
        build.browserSync(),
        build.watch(['source/**/*.md', 'source/**/*.php', 'source/**/*.scss', '!source/**/_tmp/*'])
    ]
});

mix.js('source/_assets/js/main.js', 'js')
    .sass('source/_assets/sass/main.scss', 'css')
    .options({
        processCssUrls: false
    }).version();

my main.scss

$fa-font-path: "../webfonts";

@import '[email protected]/fontawesome-free/scss/fontawesome.scss';
@import '[email protected]/fontawesome-free/scss/solid.scss';
@import '[email protected]/fontawesome-free/scss/brands.scss';
@import '../css/swiper.min.css';
@import '../css/customisations.css';

Please sign in or create an account to participate in this conversation.