Closed sstraust closed 4 months ago
:autoload
means exactly that. It only stops the code from being loaded automatically. It does not stop compilation and therefore will continue to show compiler warnings.
To get that you have to get a bit more manual and trigger actual compilation from the REPL. There are a couple helpers for that in shadow.cljs.devtools.api
. Here is how that would look at the command line, which of course you likely want to do via your Editor.
npx shadow-cljs clj-repl
This drops you into a CLJ REPL, much like connecting your Editor would. You can then start the watch
, but with autobuild disabled, meaning it only builds once and then waits
(shadow/watch :app {:autobuild false})
Then later to trigger actual build with all the changes that happened since the last build
(shadow/watch-compile! :app)
# or to run all active builds
(shadow/watch-compile-all!)
You can also toggle between autobuild on/off via
(shadow/watch-set-autobuild! :app true|false)
Thank you for the quick support!
shadow-cljs.edn:
:devtools {
:autobuild false
}
is exactly what I was looking for!
here is my shadow-cljs.edn. I'm running shadow-cljs from cider (via cider-jack-in-cljs).
I've disabled autoload, but on saving one of my clojurescript files, all of the warning messages pop up in my browser. It's super distracting for in-progress development, because when I save a half-finished file, my browser pops up with a bunch of warning messages saying everything is broken.
Weirdly, the browser does not autoload if I stop the build from the browser console. Is there any way to configure my shadow-cljs so that this doesn't happen? Am I missing something obvious?
Thanks!