Fork me on GitHub

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


never mind I forgot the ^:dev/after-load on the render call šŸ˜•

Ted Ciafardini15:04:16

been there:sunflower:


I have an electron app built with shadow based on 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 and tried a few different ways of importing but was not successful



 :dev-http {8080 "resources/public/"}

 [[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!}}}}}

Fahd El Mazouni05:04:36

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


yeah, electron has changed a lot and most templates that exist have not been updated to how you are supposed to do things nowadays


Thanks yall!