Skip to content

Commit 90fc275

Browse files
Deraendnolen
authored andcommitted
CLJS-1939: Fix Node load_file call for foreign-deps
1 parent 47cd1ce commit 90fc275

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/clojure/cljs/compiler.cljc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,9 +1048,10 @@
10481048
(if (= :nodejs target)
10491049
;; under node.js we load foreign libs globally
10501050
(let [{:keys [js-dependency-index options]} @env/*compiler*
1051-
ijs-url (get-in js-dependency-index [(name lib) :url])]
1051+
ijs (get js-dependency-index (name lib))]
10521052
(emitln "cljs.core.load_file(\""
1053-
(str (io/file (util/output-directory options) (util/relative-name ijs-url)))
1053+
(str (io/file (util/output-directory options) (or (deps/-relative-path ijs)
1054+
(util/relative-name (:url ijs)))))
10541055
"\");"))
10551056
(emitln "goog.require('" (munge lib) "');"))))])
10561057

0 commit comments

Comments
 (0)