We're updating the issue view to help you get more done. 

cljs.main: Browser REPL port not conveyed if --compile

Description

This works:

1 2 3 4 $ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}}}' -m cljs.main -p 8090 -d out -r ClojureScript 1.10.439 cljs.user=> clojure.browser.repl/PORT 8090

but adding -c fails:

src/foo/core.cljs

1 (ns foo.core)
1 $ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}}}' -m cljs.main -p 8090 -d out -c foo.core -r

with the REPL blocking and the browser log indicating:

1 2 [Error] Failed to load resource: Could not connect to the server. (repl, line 0) http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22v9YNhZWQN3%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22http%3A%2F%2Flocalhost%3A8090%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D

out/main.js has

1 var CLOSURE_UNCOMPILED_DEFINES = {};

Environment

None

Status

Assignee

Unassigned

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

None

Priority

Major