In the process of updating my nuget packages for BundleTransformer.Less from 1.9.20 to 1.9.143 my application's styles no longer appeared correctly.
I tracked the issue to less not compiling a file because of the order of variable declaration and use. My understanding of less says you can define a variable after using it, but it is no longer the case for me. I am able to reproduce with something as simple as
html {
color : @test;
}
@test:green;
Which works in online less sandboxes for me.
My app builds and serves up the .less file when requested without error, but the contents of the file is just
variable @test is undefined on line 17 in file '/icons.less':
[16]: html{
[17]: color : @test;
------------^
[18]: }
What part of compilation would suddenly enforce a requirement about variable orders?