Skip to content

Commit

Permalink
fix :source-map-path support under :none optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
dnolen committed Jun 22, 2016
1 parent f120fdd commit 6232274
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/clojure/cljs/compiler.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,11 @@
(sm/encode {(url-path src) (:source-map sm-data)}
{:lines (+ (:gen-line sm-data) 2)
:file (url-path dest)
:source-map-path (:source-map-path opts)
:source-map-timestamp (:source-map-timestamp opts)
:source-map-pretty-print (:source-map-pretty-print opts)})))))
:source-map-pretty-print (:source-map-pretty-print opts)
:relpaths {(util/path src)
(util/ns->relpath (first (:provides opts)) (:ext opts))}})))))

#?(:clj
(defn emit-source [src dest ext opts]
Expand Down Expand Up @@ -1271,7 +1274,8 @@
(when sm-data
{:source-map (:source-map sm-data)}))]
(when (and sm-data (= :none (:optimizations opts)))
(emit-source-map src dest sm-data opts))
(emit-source-map src dest sm-data
(merge opts {:ext ext :provides [ns-name]})))
(let [path (.getPath (.toURL ^File dest))]
(swap! env/*compiler* assoc-in [::compiled-cljs path] ret))
(let [{:keys [output-dir cache-analysis]} opts]
Expand Down

0 comments on commit 6232274

Please sign in to comment.