can you post your shadow-cljs.edn config for this build? you likely have to set :output-dir
and asset-path
to different values than they are now. For example:
:builds
{:my-build {:output-dir "dev/public/js" :asset-path "/js" :modules {...}
:devtools {:http-port 8021
:http-resource-root "public"
:http-root "dev/public/"}}
@huxley you cannot open the html file directly from disk. it needs to be served via http (eg. via :dev-http
)
thx
what opts do I need to pass in this line? :main-opts ["-m" "shadow.cljs.devtools.cli" ]
I fount that line here https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn
can I hardcode the watch app
in the deps.edn?
sure, just add "watch" "app"
something like :main-opts ["-m" "shadow.cljs.devtools.cli" "watch app"]
ah, let me try
Hello ๐:skin-tone-2: If I have understood correctly shadow-cljs produces some JS code that will open a websocket server (in the client) and adds that to the rest of the JS code generated from CLJS. That websocket server will then accept new code updates (like userโs REPL evals) from the shadow-cljs process (that does the compilation of the CLJS code to JS). Would it be possible to open manually the websocket server inside the library I have created (I guess I can just require shadow-cljs NPM package and use that?) and make it accept JS code coming from the shadow-cljs build process?
well most importantly shadow-cljs is written in Clojure not ClojureScript. so you cannot embed it into a JS process.
but also that part of shadow-cljs is not written as a library and cannot be used like that. it is meant as a standalonee process to do what shadow-cljs does not some other user-related things
Thanks for the answers. Iโll go back to the hammock to think about this ๐
Iโm interested trying out to keep the REPL-feeling when I have done a release build. The release build will strip away this websocket-server since it is made to be used only for dev time.