This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-24
Channels
- # announcements (1)
- # beginners (113)
- # calva (16)
- # cider (6)
- # cljsrn (1)
- # clojure (104)
- # clojure-argentina (2)
- # clojure-dev (3)
- # clojure-italy (1)
- # clojure-nl (10)
- # clojure-spec (6)
- # clojure-uk (4)
- # clojuredesign-podcast (44)
- # clojurescript (25)
- # core-async (2)
- # datomic (21)
- # emacs (14)
- # events (1)
- # figwheel-main (12)
- # fulcro (7)
- # joker (2)
- # leiningen (1)
- # mount (7)
- # music (1)
- # off-topic (16)
- # pedestal (3)
- # re-frame (8)
- # reagent (8)
- # reitit (11)
- # shadow-cljs (4)
- # spacemacs (16)
- # sql (1)
- # tools-deps (14)
- # vim (1)
I can't get hot reloading to work with clojure code. Here's my build
^{:watch-dirs ["src/cljs", "src/clj"]
:reload-clj-files [:clj]
:ring-handler com.example.server/app
:css-dirs ["resources/public/css"]}
{:main com.example}
It fails because figwheel does not accept src/clj
as watch folder, since there are no .cljs files there. Did somebody get it to work?@roti figwheel doesn't support reloading clj
files directly. It automatically reloads only those that contain macros used by the cljs
files.
take a look at https://github.com/weavejester/ns-tracker
@roti I wrote a small library for this. The code is quite simple and based on what fighweel does. Maybe you can just take the code from core.clj rather than depend on the lib if you'd like: https://github.com/thiru/clj-reloader
btw, your comment regarding unloading code https://github.com/thiru/clj-reloader/blob/master/src/reloader/core.clj#L94
that's exactly what clojure.tools.namespace.*
provides -> loading and unloading code.
@roti here is a proof of concept that uses figwheel.main.watching
and clojure.tools.namespace.*
. You already have them as dependencies. https://github.com/dimovich/deps-cider-cljs-reagent/blob/watch/watch.clj