Google Chrome“无法解析SourceMap” :css.map(Web Essential) [英] Google Chrome "Failed parsing SourceMap" : css.map (Web Essential)

查看:786
本文介绍了Google Chrome“无法解析SourceMap” :css.map(Web Essential)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2013 UP5 + Web Essential(v。2.6.36)生成的css.map文件在Google Chrome中无效,但在Firefox中有效。由于这个,它变得不可能调试更少的文件在谷歌chrome。



目前,我使用的是Web Essential 2.6.36 )。
我可以从google chrome的开发者设置中禁用源地图。这将删除那些错误,但是我们仍然无法调试更少的文件和更改风格。这是一个可怕的问题。



< img src =https://i.stack.imgur.com/SfWQJ.pngalt =Google Chrome开发人员工具:停用来源地图解析>



任何建议将不胜感激。

问题是WebEssentials将文件保存在 UTF8 with BOM ,但Chrome无法以 .map 文件打开这些文件。



作为临时修复,您可以在Visual Studio中转到 .map 文件, code> Unicode (UTF-8无签名)或 US-ASCII 使用

 文件 - >高级保存选项 - > Unicode(UTF-8无签名)或US-ASCII。 

有可能在更改关联的 .css 文件,你将不得不重复这个过程。然而,当我测试添加一些规则到 .css 时,保存了 .map 文件的正确格式。 p>

我在WebEssentials GitHub上报道:
Issue 1993 < a>



还有一些其他报告:




Visual Studio 2013 UP5 + Web Essential's (v. 2.6.36) generated css.map files are invalid in "Google Chrome", however it is valid in "Firefox". Due to this it became impossible to debug less files in google chrome.

Currently, I am using Web Essential 2.6.36 (+ Visual Studio 2013 Up5). I can disable the source map from google chrome's developer's setting. Which will remove those errors, however still we cannot debug less files and change the style. Which is a terrible problem.

Any advice will be appreciated. Thank you in advance.

解决方案

Problem is that WebEssentials saves files in UTF8 with BOM, but Chrome is not able to open these files as .map files.

As a temporary fix, you can go to your .map file in Visual Studio and save it as a Unicode (UTF-8 without signature) or US-ASCII using

File -> Advanced Save Options -> Unicode (UTF-8 without signature) or US-ASCII.

It is possible that on changing the associated .css file you will have to repeat this process. However, when I tested adding some rules to .css the correct format was preserved for the .map file.

I reported this on WebEssentials GitHub: Issue 1993

And there are some other reports:

这篇关于Google Chrome“无法解析SourceMap” :css.map(Web Essential)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆