Browse files

When target is :nodejs, default :optimizations to :simple

  • Loading branch information...
1 parent 26b2e97 commit fc75b649eb41a238c0a7eb77f6e0fd0181c1bc30 @brentonashworth brentonashworth committed Jul 16, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/clj/cljs/closure.clj
5 src/clj/cljs/closure.clj
@@ -627,7 +627,10 @@
(defn build
"Given a source which can be compiled, produce runnable JavaScript."
[source opts]
- (let [compiled (-compile source opts)
+ (let [opts (if (= :nodejs (:target opts))
+ (merge {:optimizations :simple} opts)
+ opts)
+ compiled (-compile source opts)
js-sources (if (coll? compiled)
(apply add-dependencies opts compiled)
(add-dependencies opts compiled))

0 comments on commit fc75b64

Please sign in to comment.