Skip to content

Commit a4d6a24

Browse files
mneiseswannodette
authored andcommitted
CLJS-1467: Foreign Libraries not included when using :main with :simple or :advanced
Fixes bug by checking if either output-file or output-to option is set, which means that compile-file will return a IJavaScript map instead of a String when output-to option is set. Need to check if output-to is a String, since it also could be the :print keyword, in which case we don't want to write the output to disk.
1 parent 44f2e44 commit a4d6a24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@
428428
returns a JavaScriptFile. In either case the return value satisfies
429429
IJavaScript."
430430
[^File file {:keys [output-file output-to] :as opts}]
431-
(if output-file
431+
(if (or output-file (string? output-to))
432432
(let [out-file (io/file (util/output-directory opts)
433433
(or output-file output-to))]
434434
(compiled-file (comp/compile-file file out-file opts)))

0 commit comments

Comments
 (0)