@oskarkv I don't see :external-config
in the CLJS compiler options https://clojurescript.org/reference/compiler-options
Look at the :preloads
section here -- https://figwheel.org/docs/compile_config.html
it shows how to use devtools
@dimovich the preloads section does not say how to configure devtools, just that it preloads.
Here it says to use :external-config https://github.com/binaryage/cljs-devtools/blob/master/docs/configuration.md#configuration-via-compiler-options
Hey all, I'm seeing soemthing weird. I'm using figwheel main with re-frame. When I make a change to one of the source files, I see the code get reloaded for that file (via the browser console), however functions do not appear to be re-loaded.. I.e.
If I have a component that renders a header, and I make a change to the header, that component does not change. I am confident that the file is re-loaded as I have put a (js/console.log "hi")
inside of the file (which gets printed as the file reloads) but if I put one inside of the function, it does not get printed as the file re-loads
I'm rather baffled by this
It's hard to tell without some code examples. Are you talking about a re-frame event / subscription ? Or about a reagent component? Does the component make reference to some reagent/atom ?
Does the function that mounts your reagent components has the ^:after-load
figwheel hook?
Have you tried using the programmatic configuration? https://github.com/binaryage/cljs-devtools/blob/master/docs/configuration.md#programmatic-configuration
I see that figwheel-main is aware of the :external-config
It would just be a regular component such as:
(defn title
[]
[:h1 "mooo"])
I do not have an ^:after-load
hook
this is how I usually use figwheel-main
--> https://gist.github.com/dimovich/34a75744b0c1d8e1b13ae19c2cb324a6
more information -- https://figwheel.org/docs/hot_reloading.html
This helps a lot, thank you
You might need this too https://github.com/Day8/re-frame/blob/master/docs/FAQs/Why-Clear-Sub-Cache.md
I tried with the programmatic config, but figwheel-main loads devtools by default, but only with the formatters, and that happens after my own preload. 😛