This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-02
Channels
- # announcements (2)
- # aws (7)
- # babashka (47)
- # beginners (54)
- # biff (6)
- # calva (14)
- # clojure-europe (7)
- # clojure-germany (2)
- # clojure-japan (4)
- # clojure-norway (5)
- # datalevin (1)
- # deps-new (13)
- # helix (5)
- # hoplon (1)
- # hyperfiddle (12)
- # introduce-yourself (6)
- # joyride (1)
- # malli (2)
- # off-topic (21)
- # polylith (11)
- # re-frame (3)
- # reitit (8)
- # remote-jobs (1)
- # scittle (25)
- # shadow-cljs (20)
- # vim (19)
- # xtdb (4)
Question about :watch-dir
: if my server's resource handler root is public/assets
, should :watch-dir
be the subdirectory I want to reload? in this case my directory structure is
- resources
- public
- assets
- css
- js
but I can't get the CSS to reloadassets/css/styles.css
this is the route I'm using in Reitit
["assets/*" {:handler (r/create-resource-handler {:root "public/assets"})}]
:root
is "public" if not specified.I'm also using deps.edn
for source paths, but I'm guessing that doesn't matter.
yeah, doesn't work for some reason. I'll tinker with it
you said assets/css/styles.css
which is a relative path, so if its somewhat deeper nested that will not work
Absolute path is /home/slothrop/Documents/clojure/cljs/stats/resources/public/assets/css/styles.css
and then in my link
it's /assets/css/styles.css
check the browser console, could be that shadow-cljs tries to reload the css file but just gets an older cached version from your server?
I don't see the usual load CSS message from shadow, just the ready message