Monday, April 10, 2017

Laravel Mix URL processing distorts file path

I'm trying to set up Larvel Mix with internal URL processing, but somehow it disfigures all my file paths. For instance, if I use an icon in app.scss:

background-image: url("../icons/search.svg");

Everytime I get in app.css

background-image: url(/fonts/search.svg?0aeb120951582cc56d9d8681f88ff583);

The corresponding file is also copied to public/fonts/ and I just can't figure out, where this folder creeps into my path. In my webpack.mix.js I don't have anything special.

mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')

Has anybody already had this kind of problem?



via Roman Dorokhov

Advertisement