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

0 votes
in ClojureScript by

With the new feature to use a temp output dir, the script tag has an odd {{src}} attribute

<script src="/main.js" type="text/javascript"></script>

Repro:

clj -Srepro -m cljs.main

If, on the other hand you do

clj -Srepro -m cljs.main -d out -r

you get

<script src="out/main.js" type="text/javascript"></script>

6 Answers

0 votes
by

Comment made by: mfikes

The attached patch simply defaults to {{"out"}} if {{output-dir}} is not set, but only for the purposes of the rendering call {{default-index}}.

0 votes
by

Comment made by: mfikes

This is actually incorrect to do. If the user copies the {{index.html}} that this patch renders, then the REPL no longer works because it no longer points to the {{main.js}}.

0 votes
by

Comment made by: mfikes

The (more complicated) patch 2 adds logic that doesn't use a temp out dir if {{index.html}} exists.

0 votes
by

Comment made by: mfikes

Third patch rebaselines.

0 votes
by

Comment made by: mfikes

CLJS-2624-4.patch rebaselines

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