What benefit has using figwheel main over shadow-cljs? It's ok to give a biased answer, I'm also going to ask in #shadow-cljs
I am no expert on this, but Figwheel-main seems less complicated to use than shadow-cljs for development, especially where you are predominantly using Clojurescript. If using lots of (bleeding edge) JavaScript packages via npm is important, then shadow-cljs seems to have advantages. Very interesting to read @danie comments, seems a very interesting approach.
might be late for the party but i just love shadow
i dont have list of pros and cons but my experience.
i developed website using figwheel-main and sometimes i had issues with advanced compilation where i had to turn on warnings about infers to spot the issue.
with shadow i never had issues like that and also i use a lot of npm
and i never had an issue with that.
Before this i used luminus (and figwheel) so adding anything npm was annoying as hell.
Mind you i am just novice but those are my experiences. It is very possible that i am attaching my lack of knowledge to tooling
Figwheel is the raw clojurescript compiler, shadow is almost its own dialect.
That's why I use it: so I'm aligned with the community.
it = figwheel main?
To me, this question feels like a category error: It is not figwheel/shadow. For me the choice is cljs.main/shadow, with figwheel as a dev tool.
This is how I compile the prod version of the app:
clojure --main cljs.main --compile-opts common.cljs.edn --compile-opts min.cljs.edn --compile-opts prod-config.cljs.edn --compile
I strongly prefer the simplicity of that, and the building blocks that give me.
Choosing shadow-cljs
, means that you choose to use shadow to go cljs->js. I choose cljs.main
.
Having made that choice, figwheel-main
affords me awesome development convenience. And I love it for that.
I go through the song and dance of webpack, pre :target :bundle
, to bring in dependencies. I am ok with that, since taking on a new dep should have friction. It is a decision point. Soon I will look into :target :bundle
and see what that simplifies for me.
@borkdude Aside from my long reply - we use a version of https://github.com/pesterhazy/cljs-spa-example/tree/master/doublebundle to manage our npm deps. And then I commit (the horror) the resulting npm-libs-bundle-min.js
and npm-libs-bundle.js
- this way my team mates don’t have to touch npm
or even have it installed.
yeah
thanks!
Everyone should hold off installing Big Sur as it breaks file watching in Figwheel https://github.com/bhauman/figwheel-main/issues/253
thanks @chancerussell
Yah
Cool. I'll go with this then
I think this is sensible. I did the same.
We do sort of the same right now