Skip to content

Excluding specific LESS files from Magento compilation

I am wondering if there is a way I can exclude specific .less files from compilation, or even an entire directory.

I am having a lot of trouble trying to upgrade FontAwesome to the latest version.

I’ve uploaded all the kit for FontAwesome 6 but running the compiler returns errors because of ParseError: Unexpected input in from the FontAwesome less files even though I believe they are syntatically correct (example below).

ParseError: Unexpected input in _sizing.less on line 15, column 5
13|
14| // step-based scale (with alignment)
15| each(.fa-sizes(), {
16|   .@{fa-css-prefix}-@{key} {
17|     .fa-size(@value);
18|   }

It would be good to just ignore the entire FontAwesome directory when running the compiler commands if there is a way to do this?