Laravel-mix: How to change path of fonts?

Created on 8 Jun 2017  路  4Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 0.12.1
  • Node Version: 7.7.4
  • NPM Version: 4.1.2
  • OS: macOS Sierra 10.12.5

Description:

I want to change path of fonts. But i can't see any option to do this. I try set value for option: publicPath but it is fail too. Anyone can't help me?

stale

Most helpful comment

Disable url processing

mix.options({
  processCssUrls: false,
})

Then copy yourself

mix.copy('./node_modules/font-awesome/fonts/*.*',  './public/your-folderfonts/');

All 4 comments

let path = 'resources/themes/abc/assets';
mix.options({ publicPath: 'public/static' });

mix
    .js(path + '/js/vendor.js', 'public/static/js')
    .js(path + '/js/app.js', 'public/static/js')
    .sass(path + '/scss/vendor.scss', 'public/static/css')
    .sass(path + '/scss/app.scss', 'public/static/css');

Disable url processing

mix.options({
  processCssUrls: false,
})

Then copy yourself

mix.copy('./node_modules/font-awesome/fonts/*.*',  './public/your-folderfonts/');

Thanks, but i have alot of picture and font, this is good way but it's not best way. I want to move my pictures and fonts to /static. I think we can do different ways.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rlewkowicz picture rlewkowicz  路  3Comments

Cheddam picture Cheddam  路  3Comments

wendt88 picture wendt88  路  3Comments

dtheb picture dtheb  路  3Comments

mstralka picture mstralka  路  3Comments