boot-clj/boot-figreload

How to enable reload of css in electron app? (actually problem in css @import)

Closed this issue · 10 comments

Hi there,

Using boot-figreload for electron-based app and having trouble autoreloading css. Should i somehow specify path to css files?

My build.boot can be found here: https://github.com/cryptounicorns/desktop/blob/master/build.boot

Thanks in advance!

In theory as long as they are on the classpath the watch should trigger and the css message sent to figwheel.

Would be greatful for any advice, currently unable to make it work 😭

Sure, I am here, I just need some info. I have never worked with electron apps and as you might imagine I have not tested all platforms/tooling combinations.

I good starting point would be a minimal reproducible example.

Yes, sure. Fortunately my project is opensource: https://github.com/cryptounicorns/desktop

Thank you for your time!

I see you are not using boot-figreload there, are you?

sorry it's down there

It might end up in the same place, but it is worth trying putting it in src directly like https://github.com/arichiardi/figreload-demo/tree/master/src

Also by minimal repro usually you should use something minimal, without too many deps/interactions. This is because I don't have much time to debug your app directly but I will probably find the time to have a look at something smaller.
For instance you could try reproducing the problem in https://github.com/arichiardi/figreload-demo. If it does not work there we can be sure that there is something going on in either boot-figreload or boot-cljs or interaction thereof.
If it is working there we are more on going to dig on the electron side of the things. My first hunch being the channel (are other messages sent correctly? If you open the debugger -> Networks or equivalent which messages do you see on the Websocket?).

Thanks, will try this on the weekend!

Okay, spent way too much time but figured out that reload actually happens, but only for index.css. Files required via @import(....) trigger refresh of page, but css is not affected.

Thanks for your advices, anyway!

Yep we don't build any help tree for css. Probably not difficult to add.