George Katsanos
George Katsanos

Reputation: 14175

LESSC source maps not working

I'm running lessc as following:

lessc alice/public/local/less/intfarm.less > alice/public/local/css/local/compiled/intfarm.css --source-map=alice/public/local/less/intfarm.map --verbose

the source map is output but it doesn't work. I check the file and at the end I read:

...

,iBAAA;EACA,cAAA;;AA1EZ,IAAI,SA8EA;EACI,gBAAA","file":"../../../../undefined

do I need to set other flags as well? (shoutout at LESS creators: why not enable this by default and save us hours of work and searching?)

Upvotes: 0

Views: 156

Answers (2)

Francesco Borzi
Francesco Borzi

Reputation: 61874

another solution can be using --source-map-map-inline parameter instead of --source-map=... but I think the best solution is the one pointed by Bass Jobsen

Upvotes: 0

Bass Jobsen
Bass Jobsen

Reputation: 49044

You should not use the > between your source and destiny. In fact your send the output to stdout. The compiler don't know that you are writing the output to intfarm.css and so can not construct the source map link to that file.

Also see: https://github.com/less/less.js/pull/2389

Upvotes: 2

Related Questions