This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
The browser devtools should reload it for you automagically when it changes on disk, if you use the built-in server and whatnot
I know how to configure a build with my own index.html that includes my CSS. I would like to avoid that for a simple project, and just include the CSS in the default browser REPL page
I see. Seemingly, it won't know if files on disk has changed unless you have some devtool connection between the browser and the clojure process that shadow-cljs runs its builds from. Would be a lot of additional setup to get that running.
You could manually remove/add
link tags in your DOM I guess and point it to the CSS file on disk, trigger that action on change somehow
I don't think you need any fancy "hot reload" but can simply reload the entire file at once without any concern
I wonder how shadow-cljs reloads the CSS. is it just adding/removing the link tags?
yes, looking for link tags and replacing them https://github.com/thheller/shadow-cljs/blob/e9093aed586d5fb49efd94555787f0bef08fb164/src/main/shadow/cljs/devtools/client/browser.cljs#L119-L147
but browser-repl is nothing but a regular
:browser build so technically it would be easy to add. there just aren't any options for it
thanks! this doesn't directly solve my problem, but I've been thinking about how to build better tools for doing REPL driven UI development and this gives me more to chew on (how to add & dynamically reload CSS)