figwheel-main

figwheel-main http://figwheel.org
grumplet 2020-08-24T11:32:37.031400Z

@pez @folcon Discovered a real nasty with the figwheel-main webpack setup above this morning. If you don’t run figwheel.main in order to use Calva inline-eval, then you lose hot reloading.

grumplet 2020-08-24T11:34:33.032400Z

It apparently reloads - the little heads up cljs badge appears in the browser at the right time - but the code does not update.

grumplet 2020-08-24T11:37:35.034300Z

So I’m guessing it’s something to do with the main.js having updated, but the main_bundle.js which refs it not having updated. Difficult to explain why this should be :(

grumplet 2020-08-24T11:49:20.037200Z

@pez @folcon. Ah, ignore that. 🙂 The hot reload as documented in the minimal example I system I documented above does work. It looks like I’ve only broken hot reload in my current project somehow.

2020-08-24T11:55:22.038600Z

That's frustrating, but good to hear it's not a bug.

grumplet 2020-08-24T13:27:23.041600Z

Not sure what the issue is in my project. Running my core/mount-root function from the REPL reloads the changed code as expected, so I would expect tagging mount-root with ^:after-load metadata to work. But the mount-root function doesn’t get called after a source edit.

grumplet 2020-08-24T13:44:07.042600Z

OK - found the issue - I hadn’t added ^:figwheel-hooks to my core namespace, so ^:after-load wasn’t triggering. Doh!

2020-08-24T14:59:01.042900Z

Yea, that's an easy mistake to make..

pez 2020-08-24T17:12:05.043800Z

Awesome. Thanks for heads up, even if it was false this time. ❤️