Skip to content

Commit

Permalink
CLJS-2771: Elide "use strict" from final output
Browse files Browse the repository at this point in the history
Narrow regular expression (requirejs/r.js#786)
  • Loading branch information
symfrog authored and swannodette committed Jun 11, 2018
1 parent 215cd3c commit 0ffe3d8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/clojure/cljs/closure.clj
Expand Up @@ -1591,10 +1591,7 @@

(defn elide-strict [js {:keys [elide-strict] :as opts}]
(cond-> js
(not (false? elide-strict))
(->
(string/replace "\"use strict\"" " ")
(string/replace "'use strict'" " "))))
(not (false? elide-strict)) (string/replace #"(?m)^['\"]use strict['\"]" " ")))

(defn output-one-file [{:keys [output-to] :as opts} js]
(let [js (elide-strict js opts)]
Expand Down

0 comments on commit 0ffe3d8

Please sign in to comment.