If you're willing to debug your code in Chrome, you could omit the reference to the source-map so that it's not initially requested at all, then request the source-map manually from the Sources pane of dev tools.
Webpack has this option:
hidden-source-map
- Same as source-map, but doesn’t add a reference comment to the bundle.
https://webpack.github.io/docs/configuration.html#devtool
The Webpack / Chrome combo is working well for me. See the my question for a thorough description of how to apply a hidden source-map.
It may be possible to achieve hidden source-maps with uglify by specifying a blank source-map-url
, but I haven't tried this.
--source-map-url
- The path to the source map to be added in //# sourceMappingURL
. Defaults to the value passed with --source-map
.
https://github.com/mishoo/UglifyJS2
If you need to debug in Safari or Firefox, then watch for answers here: How to apply a hidden / remote sourcemap in Safari?