It seems that the LESS strategy for importing URLs does not take into account relative paths similar to CSS.
test.less
@import "sub/test.less";
div.a {
background-image:url('imagea.jpg');
}
sub/test.less
div.b {
background-image:url('imageb.jpg');
}
output.css
div.b {
background-image:url('imageb.jpg');
}
div.a {
background-image:url('imagea.jpg');
}
correct_output.css
div.b {
background-image:url('sub/imageb.jpg');
}
div.a {
background-image:url('imagea.jpg');
}
Is there a way to get this behavior from LessJS or is it an implementation error?
source
share