Permalink
Browse files

If output-to is :print if compiler redirects output. In that case set…

… sourceMappingURL to source-map to avoid trying to open file :print.

Also update source map to use //# (new format) instead of //@ (old format).
  • Loading branch information...
1 parent b924f8e commit d53e2cff0db4cb28ffdcc7554c9a9c3cfe656daa Jacob Mortensen committed with swannodette Oct 25, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/clj/cljs/closure.clj
@@ -939,7 +939,9 @@
(defn add-source-map-link [{:keys [source-map output-to] :as opts} js]
(if source-map
- (str js "\n//@ sourceMappingURL=" (path-relative-to (io/file output-to) {:url source-map}))
+ (if (= output-to :print)
+ (str js "\n//# sourceMappingURL=" source-map)
+ (str js "\n//# sourceMappingURL=" (path-relative-to (io/file output-to) {:url source-map})))
js))
(defn build

0 comments on commit d53e2cf

Please sign in to comment.