agrafix
agrafix

Reputation: 775

Chrome: Add local JavaScript SourceMap possible?

Is it possible to add a local SourceMap? I have a Website, which I cannot modify, containing compressed (closure) JavaScript. I have a local JavaScript-SourceMap belonging to that file. Is there any way to tell GoogleChrome (or any other browser) to add a SourceMap before/after the page loads?

Upvotes: 34

Views: 12419

Answers (1)

JeFf
JeFf

Reputation: 396

You cannot point to file containing the map. You can however host your map locally and then point to localhost address. In the javascript source file there also must not be

//# sourceMappingURL=...

comment presented since than Chrome DevTools won't load the sourcemap if it is different than specified in the URL.

Upvotes: 12

Related Questions