0

I've been working with dotless to compile my less files and everything went smoothly until the client asked to move our less files on a separate server. Now the less is somehow only partial compiled. For example, if I have something like ul li {color: red} it works fine. But if I have ul { li {color: red} } it doesn't work. This is just a dummy example.

Francesco Montesano
  • 8,485
  • 2
  • 40
  • 64
Anv
  • 13
  • 3

1 Answers1

2

Could you be a little more specific about the setup you are now running?

Assuming you are using the dotless HttpHandler, I can only point out that simply moving some less files to another server simply doesn't work.

The dotless HttpHandler is a server-side component that pulls in the .less files and compiles them down to .css before sending them to the Web browser. So if you are only moving the .less file to another server where dotless is not installed, you will loose the compilation step between less and css.

What you have to do in order to offload the less files to another server (like a CDN) is add a new step to your deployment process that uses the dotless.Compiler.exe to turn the .less files into css files that can then get served by any web-server.

What is probably happening at the moment is that you moved the .less file and the new server is simply serving it as plain text, not compiling it from less to css

Tigraine
  • 23,358
  • 11
  • 65
  • 110