Welcome! Please see the About page for a little more info on how this works.

+1 vote
in ClojureScript by

I've been working with Chrome Extensions for some time and it would be amazing to get ClojureScript hot reloading capabilities there.

I tried Thomas Heller example shadow-cljs project for Chrome Extensions and some other stuff that I documented in a minimum example repo, but with no success.

In summary, seems like the Chrome Extensions' v3 manifest prohibits eval, which means we are out of luck?

Thanks!

1 Answer

+1 vote
by

I went down this rabbit hole some months ago and followed the advice from this comment to use a patched chromium build (which turned out not as gnarly as it sounded). Happy eval(-ing) ever since :)

FWIW the manifest I ended up with.

by
Thanks for your answer! Haven't tried it yet, as I'm still hoping for a less "buildy" alternative, but it is good to know that that option exists. Some questions: 1) Have you considered keeping a dev-only v2 manifest? 2) Have you tried to update your patched chromium build to have the latest api updates and all? If so, did it work? Seems necessary long term. (Ps. man, I laughed out loud when I read you username! Seemed quite appropriate for this hahaha)
by
yw! 1) v2 and v3 seem to differ quite a lot*, including API changes so I'd assume that would become very messy 2) haven't but I don't expect issues as both the patch and the extension are simple.

*) https://developer.chrome.com/docs/extensions/develop/migrate
...