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 yourpublic/images
folder, and then rewrite theurl()
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 });