Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

(def x 3)

Working with {{-d}}:

$ clj -m cljs.main -re node -d out -r ClojureScript 1.10.238 cljs.user=> (load-file "foo.cljs") nil cljs.user=> x 3

You will end up with {{out/out/cljs/user/fooAD3E4B4.js}}

Otherwise things appear to work.

4 Answers

0 votes
by

Comment made by: uosl

{{cljs.closure/compile-file}} adds {{:output-dir}} from {{opts}} to file, causing it to appear double. Passing {{(dissoc opts :output-dir)}} as third argument to cljs.closure/src-file->target-file (as is done in {{cljs.repl.rhino,nashorn,node,graaljs}}) avoids adding the first instance of output-dir to fix this bug, and fixes CLJS-2917 as well.

0 votes
by

Comment made by: mfikes

CLJS-2753.patch LGTM and passes in CI and Canary.

I confirmed correct behavior for the ticket as written and for CLJS-2917 and I also did some light testing with other scenarios.

0 votes
by

Comment made by: mfikes

CLJS-2753.patch added to Patch Tender (i)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2753 (reported by mfikes)
...