Using original JS source maps

I think I found a way to solve this; very much by trial and error and works in Chrome and Firefox (not in Safari for unknown reasons). Slight modification to the function convert-sources* in source file shadow.build.closure.clj is needed (used version 2.11.1). I’ve added the following settings to the compiler options co:

(.setApplyInputSourceMaps co true)
(.setSourceMapIncludeSourcesContent co true)

This part of the code needed to be removed to have the original source map contents included:

(.reset source-map)

And this part doesn’t seem to do anything anymore (and could be removed?)

;; for sourcesContent
(.addSourceFile (.getName source-file) (.getCode source-file))

I have tested this with transpiled JS sources which include source map with original file contents (a comment added at the end of the generated JS file, e.g. //# sourceMappingURL=data:application/json;base64,ewogI...) which appears to be working well.

Unfortunately I’m not intimately familiar with the Google Closure compiler, so it’s very hard for me to tell if these are proper changes and don’t break existing stuff. If you’d like, I’ll gladly make a PR for this to review / discuss.

Thanks!