Cvetan's avatar

Can't compile LESS because of relative paths in Mix

I have some html template bought on themeforest. I have LESS files in it, so I want that compiled without unnecessary code, and sized down. However I can't compile it because of bunch of problems with paths.

First problem was with importing google fonts like this: @import url('https://fonts.googleapis.com/css?family=Roboto:400,300,500,700');

But I found some discussion on the Internet about webpack, and adding .css on the url solve that.

However I have some LESS file that imports some font file. Withing the file there is relative path '../fonts/...' to the font which does exist, however it throws error: Error: Can't resolve './icons/fonts/themify.eot'

Do you have any suggestion or there is some catch I missed with webpack when compiling LESS? :) Just to say I don't want to disable processing CSS paths because I wanted referenced fonts etc, distributed to public folder.

0 likes
1 reply
Cvetan's avatar
Cvetan
OP
Best Answer
Level 6

I found error. Paths for the fonts were wrong. It referenced parent folder of the less file and then font file inside it, which was wrong. The folder with fonts is in the same directory as the less file.

Please or to participate in this conversation.