_Comment made by: djebbz_
Sorry to bump the issue, and maybe pollute the tracker and maybe waste your time.
It seems the initial problem is solved with the latest commit on master to date. There is a "target/js/cljs/loader.js" file that looks legit. To reproduce use the following deps.edn file (only cljs coordinate changed)
{code:title=deps.edn}
{:deps {org.clojure/clojurescript {:git/url "
https://github.com/clojure/clojurescript" :sha "6eedd0a08c49f7b0d4dcb30977b2fb38c90577bd"}}
:aliases {:bug {:main-opts ["-m" "cljs.main" "-co" "bug.cljs.edn" "--repl"]}}}
But there are 2 other problems now.
1. The generated synthetic main.js file is broken. Here's the content from my browser's devtools for the main.js file:
{code:title=main.js}
var CLOSURE_UNCOMPILED_DEFINES = {"clojure.browser.repl.PORT":9000,"clojure.browser.repl.HOST":"localhost","goog.json.USE_NATIVE_JSON":true};
var CLOSURE_NO_DEPS = true; document.write('<script src="target/js/goog/base.js"></script>');
document.write('<script src="target/js/goog/deps.js"></script>');
/cljs_deps.js"></script>'); // <--- BROKEN !
document.write('<script src="target/js/brepl_deps.js"></script>'); document.write('<script>goog.require("clojure.browser.repl.preload");</script>');
So the browser complains with "Uncaught SyntaxError: Invalid regular expression flags" (of course).
2. The repl doesn't launch in the terminal. Maybe related to the first problem?
Should I open another issue for this problem? I haven't investigated enough if it's related to this particular config or a general problem with Cljs.