How to debug why MS Edge/IE11 does not load sourcemap

Bobris picture Bobris · Jan 8, 2016 · Viewed 9.8k times · Source

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"?

Answer

Sampson picture Sampson · Jan 9, 2016

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.