Skip to content

Instantly share code, notes, and snippets.

@tomasnorre
Created July 10, 2021 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasnorre/f313897b1485b59b51efb6cc845fc153 to your computer and use it in GitHub Desktop.
Save tomasnorre/f313897b1485b59b51efb6cc845fc153 to your computer and use it in GitHub Desktop.
Problem with Jigsaw, Laravel Mix and Locale fonts

I'm having a problem with the Jigsaw and copying the fonts from source/_assets/font folder to the build_product/assets/build/font when running npm run production

I have tried in the option section.

fileLoaderDirs.fonts = '_assets/font';

after the .options() section.

.copy('source/_assets/font/', 'font')

and the copy-webpack-plugin, none of them have worked for me.

// default webpack.mix.js
const mix = require('laravel-mix');
require('laravel-mix-jigsaw');
mix.disableSuccessNotifications();
mix.setPublicPath('source/assets/build');
mix.js('source/_assets/js/main.js', 'js').vue()
.sass('source/_assets/sass/main.scss', 'css/main.css')
.jigsaw({
watch: ['config.php', 'source/**/*.md', 'source/**/*.php', 'source/**/*.scss'],
})
.options({
processCssUrls: false,
postCss: [
require('tailwindcss'),
],
})
.sourceMaps()
.version();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment