3

I am trying to get my implementation of sourcemaps to work with dotless.

I have pulled dotless and added sourcemap(1)(2) generation to it. The problem is that even though I deliver my css-file with the corresponding

  • SourceMap : Main.less.map HTTP-Header and
  • X-SourceMap : Main.less.map HTTP-Header and have at the end of my css file the comment
  • /*@ sourceMappingUrl=Main.less.map */ and
  • /*@ sourceURL=Main.less.map */
  • chrome canary (Version 27.0.1424.0)

chrome doesn't care at all. It goes without saying, that I have enabled the "Enable source maps"-swtich in the console-settings. The content-types for all files seem to be fine too. (double checked) - For the source-map-location I have tried the full url as well as a relative notation of the address - but nothing seems to work...

Chrome doesn't even request the map file from the server. Any ideas? Did I miss something?

Cheers, Corelgott

Tobias Boschek
  • 2,158
  • 3
  • 18
  • 22
  • I took a look at the chrome source that's used to parse the tag within stylesheets: https://code.google.com/p/chromium/source/search?q=loadSourceMapForStyleSheet&origq=loadSourceMapForStyleSheet&btnG=Search+Trunk So my line needs to match the regex of: /^\/\*@ sourceMappingURL=([^\s]+)\s*\*\/$/ (js) - but even adapting my line and checking that it matches the code I deliver, (I extracted the code and created a little test-app), it still doesn't work. Chrome doesn't even request the map file from the server... any clues here? – Tobias Boschek Feb 28 '13 at 11:21

1 Answers1

0

Currently CSS source maps in Chrome only support Sass, not LESS. Even this support is behind a "Developer Tools Experiments" flag: (see Addi Osmani's post on the subject for more info).

A Mozilla team is also working on CSS Source maps for Sass, LESS and Stylus, although I don't know how active the project is. You can track their progress here: https://wiki.mozilla.org/DevTools/Features/CSSSourceMap