This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-13
Channels
- # babashka (45)
- # babashka-sci-dev (15)
- # beginners (72)
- # biff (4)
- # calva (3)
- # clj-on-windows (67)
- # clj-otel (1)
- # cljfx (7)
- # clojure (74)
- # clojure-austin (1)
- # clojure-dev (4)
- # clojure-europe (6)
- # clojure-gamedev (1)
- # clojure-germany (5)
- # clojure-losangeles (6)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojured (2)
- # clojurescript (42)
- # core-typed (2)
- # cursive (4)
- # emacs (18)
- # events (1)
- # fulcro (13)
- # humbleui (8)
- # introduce-yourself (2)
- # kaocha (11)
- # leiningen (5)
- # lsp (16)
- # malli (8)
- # off-topic (69)
- # pathom (38)
- # pedestal (3)
- # reagent (17)
- # releases (3)
- # shadow-cljs (10)
- # spacemacs (6)
- # sql (1)
- # tools-deps (5)
- # xtdb (20)
Hi is there a way to make shadow watch certain folders, I am finding the hot reload works for some files but not others, I am using local/repo in my deps files which may be related which uses relative paths. so my classpath looks like this ["src" "resources" "../../components/web-ui"] shadow does not detect changes in /web-ui with out a f5 refresh relativly new to shadow so this may be a simple answer š
On save I do get the reload icon it seems like its just not rebuilding the files in web-ui folder
been there:sunflower:
I have an electron app built with shadow based on https://github.com/BTowersCoding/electron and can only seem to import modules from electron in my main process and not my renderer. in main i have ["electron" :refer (app BrowserWindow crashReporter dialog)]
and everything in there works fine. But when I import in the renderer like ["electron" :refer (remote)]
it always breaks. I tried looking at a bunch of different electron examples because i originally thought I was (and perhaps still am) miss-using the electron library but now Iām starting to wonder if my shadow configuration is messed up.
I referenced here https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages and tried a few different ways of importing but was not successful
{:source-paths
["src"]
:dev-http {8080 "resources/public/"}
:dependencies
[[reagent "1.1.0"]
[re-frisk "1.5.2"]
[re-frame "1.2.0"]
[thheller/shadow-cljs "2.17.8"]]
:builds {:main {:target :node-script
:output-to "resources/main.js"
:main app.main.core/main}
:renderer {:target :browser
:output-dir "resources/public/js"
:asset-path "js"
:devtools {:watch-dir "resources/public"
:preloads [re-frisk.preload]}
:modules {:renderer {:init-fn app.renderer.core/start!}}}}}
Hi ! This is an electron thing, you need to configure your window ( getting spawned in the main process ) to expose the node stuff, sorry I don't remember exactly what it was. I do remember that remote is deprecated though, so maybe try to use exposeinmainworld https://www.electronjs.org/docs/latest/api/context-bridge