2 ms·
Thank you for posting this! What does your development workflow for CLJS browser extensions look like? Do you have to rebuild and reload the extension on your
by latte 9y ago
Thank you for posting this!
What does your development workflow for CLJS browser extensions look like? Do you have to rebuild and reload the extension on your development machine each time you change the code? Is it possible to use Figwheel when writing browser extensions?
- jdormit 9y agoI'm still working out the kinks in the workflow. I believe it is possible to use Figwheel while writing browser extensions [0], but I haven't set that up. I have `lein cljsbuild auto` running in the background to automatically recompile the JS when I change the source code, and use Mozilla's web-ext utility [1] to automatically reload the web extension once the JS has compiled. This system has some disadvantages, though. The main one is the glacial feedback loop - due to strict CSP restrictions in web extensions, I had trouble compiling the CLJS with {:optimizations :none}, so each save-compile-reload cycle takes ~30 seconds from when I save the source file to when I see the results of the change in the browser. I also did not figure out how to set up a REPL environment connected to the code running in the web extension. Lots of room for improvement here, basically. [0]: https://github.com/binaryage/chromex-sample#chromex-sample-project-has-following-configuration https://github.com/binaryage/chromex-sample#chromex-sample-p... [1]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Ge...