Solution: Update the vendor lessphp
module from 3.8 to 4.0. Fix also the bootstrap 3 mixins that couldn't compile with the 3.8 version.
asset-merger fails to load less font-awesome with .@{}
-
23-06-2023 - |
Вопрос
I' trying to @import
font-awesome in my project with less
files. It worked well before but now I changed the way to import it, instead of:
echo Assets::factory($filename)->css("application.less", array('processor' => 'cssmin'))->render();
I load an application.less
that @import
itself all the files. (css/less)
But I get the following error:
Exception [ 0 ]: parse error: failed at
{C:\wamp\www\haras-des-cybeles-du-luberon\assets\themes\backoffice\styles\/font-awesome/core.less on line 4
MODPATH\asset-merger\vendor\lessphp\lessc.inc.php [ 3144 ]
3139 $loc = "line: $line";
3140 }
3141
3142 // TODO this depends on $this->count
3143 if ($this->peek("(.*?)(\n|$)", $m, $count)) {
3144 throw new exception("$msg: failed at `$m[1]` $loc");
3145 } else {
3146 throw new exception("$msg: $loc");
3147 }
3148 }
Because it basically worked before with the same plugin I'm thinking that's a plugin issue. https://github.com/OpenBuildings/asset-merger
I think the less code is okay, even if I never saw this syntax before. I there any workaround to make it work here? I'm wondering about change the regex. Thx.
Решение