4

I am using UglifyJS2 to minify javascript source code.

I would like to generate source maps and point to those source maps using the X-SourceMap HTTP header, instead of the //# sourceMappingURL comment.

So, is there a facility to generate a sourcemap in uglify without appending the sourceMappingURL comment, short of just pulling it out myself?

Alex K
  • 7,771
  • 9
  • 35
  • 54
bcr
  • 1,298
  • 11
  • 26
  • How'd you end up solving this for yourself? –  Apr 22 '15 at 16:25
  • This is possible with the uglify cli because there is a separate `source-map-url` flag. This isn't the case for the node api. You can either pull it out yourself, or monkey patch your uglify. I submitted a patch to uglify2 to address this here but it has not been merged yet: https://github.com/mishoo/UglifyJS2/pull/639 – bcr Apr 22 '15 at 21:02

0 Answers0