Skip to content

Commit

Permalink
Fix foreign-lib loading, was checking for :nodejs instead of `:node…
Browse files Browse the repository at this point in the history
…js-rt`
  • Loading branch information
swannodette committed Apr 26, 2020
1 parent 7171db2 commit 419cd4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/clojure/cljs/compiler.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@
(defn load-libs
[libs seen reloads deps ns-name]
(let [{:keys [options js-dependency-index]} @env/*compiler*
{:keys [target optimizations]} options
{:keys [target nodejs-rt optimizations]} options
loaded-libs (munge 'cljs.core.*loaded-libs*)
loaded-libs-temp (munge (gensym 'cljs.core.*loaded-libs*))
[node-libs libs-to-load] (let [libs (remove (set (vals seen)) (filter (set (vals libs)) deps))]
Expand All @@ -1284,7 +1284,7 @@
;; have handled it - David
(when (and (= :none optimizations)
(not (contains? options :modules)))
(if (= :nodejs target)
(if nodejs-rt
;; under node.js we load foreign libs globally
(let [ijs (get js-dependency-index (name lib))]
(emitln "cljs.core.load_file("
Expand Down

0 comments on commit 419cd4b

Please sign in to comment.