Frage

I am linking to cloudflares cdnjs like so

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

jquery.min.js is pointing to the map like so

// Inside jquery.min.js
//@ sourceMappingURL=jquery.min.map

Which works fine, but then it prepends my hostname when trying to fetch the source-map.

https://www.MYWEBSITE.com/https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.map

Which causes the GET to error out. Any thoughts?

Update The problem seems to only be occurring in Chrome (29.0.1547.49). Works fine in Safari and Firefox

War es hilfreich?

Lösung

That's a browser bug, then. The source maps feature seems to be broken with schema-relative URIs. Please report it.

Only workaround I can think of is to use the complete URI for the original JS reference when debugging.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top