Skip to content
This repository was archived by the owner on Oct 22, 2022. It is now read-only.

Commit e7ae373

Browse files
alessandrodmoea
authored andcommitted
Actually fix ReferenceError bug with :optimizations :advanced.
When invoking the clojurescript compiler directly with :optimizations :advanced, also set :output-wrapper true. lein-cljsbuild does this too, and without it ^:export'ed symbols don't get exported correctly.
1 parent 1646b28 commit e7ae373

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugin/src/leiningen/cljs_lambda.clj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@
5959

6060
(defn- extract-compile-opts [proj]
6161
{:post [(or (nil? %) (and (coll? (:inputs %)) (map? (:options %))))]}
62-
(some-> proj :cljs-lambda :compiler))
62+
(some-> proj
63+
:cljs-lambda
64+
:compiler
65+
(update :options (fn [{:keys [optimizations] :as options}]
66+
(if (= :advanced optimizations)
67+
(merge {:output-wrapper true} options)
68+
options)))))
6369

6470
(def fn-keys
6571
#{:name :create :region :memory-size :role :invoke :description :timeout

0 commit comments

Comments
 (0)