This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-26
Channels
- # announcements (10)
- # asami (15)
- # babashka (200)
- # beginners (48)
- # calva (56)
- # cider (6)
- # clara (2)
- # cljs-dev (18)
- # cljsrn (6)
- # clojars (3)
- # clojure (23)
- # clojure-czech (2)
- # clojure-europe (41)
- # clojure-germany (5)
- # clojure-italy (19)
- # clojure-nl (5)
- # clojure-uk (8)
- # clojurescript (60)
- # clojureverse-ops (5)
- # cursive (14)
- # datomic (6)
- # events (1)
- # figwheel-main (5)
- # graalvm (17)
- # honeysql (2)
- # instaparse (1)
- # integrant (9)
- # jobs (5)
- # music (2)
- # off-topic (37)
- # other-languages (1)
- # pathom (10)
- # proletarian (5)
- # quil (3)
- # reagent (39)
- # reitit (4)
- # remote-jobs (3)
- # reveal (6)
- # rum (9)
- # shadow-cljs (27)
- # vrac (3)
- # xtdb (5)
Hello There,
I have a quick question, I am new in clojure
How do I use png file in cljs?
I have a shadow cljs application
for example "./icons/marker.png
I’ve tried using this but it’s not loading
This has nothing to do with shadow-cljs, try #beginners or #clojurescript But generally, you need to start a webserver and serve that file on the webserver you started shadow-cljs has https://shadow-cljs.github.io/docs/UsersGuide.html#dev-http, but you don't want to use that for your final app...
how are you embedding it? this is not a CLJS question really, more HTML specific. if you use ./
in the path it'll be relative to the page you are on. you need to make sure the path is correct.
Hi, how can I name the file something other than main.js?
thank you @ashnur
Hi there. Is it possible to invalidate the node_modules
cache without restarting npx shadow-cljs watch app
? Any option?
I put some console.log
on npm package for debugging.
I don't have any output, so I supposed that's because Shadow cache.
Oh perfect, thx!
yeah I removed individual file watching for node_modules
files because some projects used like 5000 files from there and that was causing some performance issues
Yeah I understand, very good reason performance wise. Thanks Thomas.
Is there a reason I should defonce
my app-db
in a re-frame project from a hot-reload perspective?
yes, without it the hot-reload will just replace it with a new atom when you modify the file
The state seems to be kept in the re-frame.db/app-db ratom. I notice no difference when I use def
on my app-db. hot reload seems to work the same.
then I don't understand your question. when using re-frame you don't have your own app-db?
I am asking because I am going to present ClojureScript app development on a meetup Wednesday. And I had sort of planned to mention defonce as a protector of the app-db, but when I tested it I noticed that that part of the demo doesn’t seem to hold. Looking in re-frame.db then, it’s app-db is also just (def app-db (ratom {}))
. I just want to understand a bit better how it really works. Even if I realize I should stay away from the subject during the demo. 😃
well you don't modify the re-frame.db
namespace so it is never reloaded and never has this issue