laravel mix: how to keep relative paths in css for images and fonts laravel mix: how to keep relative paths in css for images and fonts laravel laravel

laravel mix: how to keep relative paths in css for images and fonts


From the docs:

By default, Laravel Mix and Webpack will find example.png, copy it to your public/images folder, and then rewrite the url() within your generated stylesheet. As such, your compiled CSS will be.

As useful as this feature may be, it's possible that your existing folder structure is already configured in a way you like. If this is the case, you may disable url() rewriting like so:

mix.sass('resources/assets/app/app.scss', 'public/css')   .options({       processCssUrls: false   });

https://laravel.com/docs/5.5/mix#working-with-stylesheets