如何调试为什么MS Edge/IE11不加载源地图 [英] How to debug why MS Edge/IE11 does not load sourcemap

查看:156
本文介绍了如何调试为什么MS Edge/IE11不加载源地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了一些source + map串联,结果在Firefox和Chrome中都可以使用,但是甚至没有从MS Edge和IE11中的网络服务器请求bundle.js.map.

实际的JS文件是通过 http://localhost:8080/bundle.js

提供的

bundle.js以以下行结尾:

//# sourceMappingURL=bundle.js.map

尝试都用换行符结尾而不使用换行符,在两种情况下均不起作用.有一些要检查的清单,甚至有一些验证器"吗?

解决方案

Microsoft Edge希望在文件末尾有一个单独的sourcemap注释.您的文件包含两个注释,这似乎引起了问题.删除除最后一条评论以外的所有评论,这将为您解决问题.

我将提交票证以跟踪此问题,但是我们不太可能修改实现以适应对源地图注释的非标准使用.不过,感谢您引起我们的注意.我们将继续观察它是否会影响其他用户.

I made some source+map concatenation and result works in Firefox and Chrome, but does not even request bundle.js.map from webserver in MS Edge and IE11.

Actual JS file is served from http://localhost:8080/bundle.js

bundle.js ends with line:

//# sourceMappingURL=bundle.js.map

Tried both end it with new line and without, does not work in both cases. Is there some checklist to look at or even some "validator"?

解决方案

Microsoft Edge expects a single sourcemap comment, located at the end of the file. Your file contains two comments, which appears to cause the issue. Remove all but the final comment, and this should resolve the issue for you.

I will file a ticket to track this issue, but it's unlikely we will modify our implementation to accommodate a non-standard use of sourcemap comments. Thank you for bringing this to our attention though. We'll keep watch to see if this affects other users.

这篇关于如何调试为什么MS Edge/IE11不加载源地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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