@pez it does not. the classpath does not decide what ends up in the build. only your :require
does. what isn't required isn't included. see https://code.thheller.com/blog/shadow-cljs/2018/02/08/problem-solved-source-paths.html
That's awesome. And a great article explaining it! Thanks!
Hi! I have a problem. I had a shdaow-cljs app that was working, but now the watch function is broken. I am troubleshooting the problem and I found that the websocket connection to localhost:9630 is getting back "access denied" in proper transit format. The result is that the website is showing stale information. Restarting the app and reloading the webpage has no effect. I checked the dependencies and I think they are correct. Any suggestions for how to resolve this? Thanks!
I really gotta expand that error message ...
common problem #1: changing :output-dir
OR :modules
but not updating your HTML to actually load those files and thus loading the old files
#2: having two instances of shadow-cljs running in the same project and both running watch
competing with each other
#3: less common but when using :devtools-url
not properly proxying requests?
or what also might happen if you have 2 projects both using shadow-cljs, they'll start on port 9630 and then port 9631. there might be cases where the watch from project a isn't actually running but the files still try to connect although 9630 now belong to another project. doens't seemt to be your case though since you said watch is running
I am not using devtools-url
. Let me check #1.
I don't have two proejcts with shadow-cljs.
Wait...
make sure the server is actually what you think it is
I rebooted. No other shadow-cljs processes running. The link above checks out as my project. I don't know why I'm getting access denied from the websocket reply.
did you verify you are loading the correct files? delete them to be sure
Hmmm, let me check
could also be some sort of cache? maybe you have a service worker installed that caches too aggressively?
Ah. Let me check...
The service-worker was the problem! Thanks, @thheller!
A naive point of view: it doesn't seem like hot code reloading works properly with service-workers. I am sure that I don't have it configured properly...
I take that back. I had installed my pwa which was causing the problem.
Hi again. Can web workers have a different output-dir
than the other modules? I would like to use the modules feature to generate my service worker...
a service worker should really be a separate build
makes absolutely no sense to combine it
IMHO I wouldn't even write a service worker in CLJS. probably just use something like https://developers.google.com/web/tools/workbox to generate it
Ok. Thanks @thheller!
BTW, @thheller, This is an excellent library you have developed. I am really impressed.