简体   繁体   English

无法让源图工作

[英]Can't get sourcemap to work

I am trying to get my implementation of sourcemaps to work with dotless. 我试图让我的源图实现与dotless一起工作。

I have pulled dotless and added sourcemap (1) (2) generation to it. 我已经无缝地添加了sourcemap (1) (2)代。 The problem is that even though I deliver my css-file with the corresponding 问题是即使我用相应的交付我的css文件

  • SourceMap : Main.less.map HTTP-Header and SourceMapMain.less.map HTTP-Header和
  • X-SourceMap : Main.less.map HTTP-Header and have at the end of my css file the comment X-SourceMapMain.less.map HTTP-Header并在我的css文件末尾有注释
  • /*@ sourceMappingUrl=Main.less.map */ and /*@ sourceMappingUrl=Main.less.map */
  • /*@ sourceURL=Main.less.map */
  • chrome canary (Version 27.0.1424.0) chrome canary(版本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. 不言而喻,我在控制台设置中启用了"Enable source maps" -swtich。 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... (双重检查) - 对于source-map-location,我尝试了完整的URL以及地址的相对符号 - 但似乎没有任何工作......

Chrome doesn't even request the map file from the server. Chrome甚至不从服务器请求地图文件。 Any ideas? 有任何想法吗? Did I miss something? 我错过了什么?

Cheers, Corelgott 干杯,Corelgott

Currently CSS source maps in Chrome only support Sass, not LESS. 目前Chrome中的CSS源地图仅支持Sass,而不支持LESS。 Even this support is behind a "Developer Tools Experiments" flag: (see Addi Osmani's post on the subject for more info). 甚至这种支持也是“开发者工具实验”标志的背后:(有关更多信息,请参阅Addi Osmani关于该主题的帖子 )。

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. Mozilla团队也在为Sass,LESS和Stylus制作CSS源地图,尽管我不知道该项目有多活跃。 You can track their progress here: https://wiki.mozilla.org/DevTools/Features/CSSSourceMap 您可以在此处跟踪他们的进度: https//wiki.mozilla.org/DevTools/Features/CSSSourceMap

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM