Fork me on GitHub
#figwheel-main
<
2020-07-03
>
borkdude10:07:34

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

danieroux14:07:44

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-&gt;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.

💯 9
practicalli-john05:07:26

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 @U9E8C7QRJ comments, seems a very interesting approach.

lepistane10:07:48

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

dominicm12:07:27

Figwheel is the raw clojurescript compiler, shadow is almost its own dialect.

dominicm12:07:48

That's why I use it: so I'm aligned with the community.

👍 3
borkdude13:07:34

it = figwheel main?

borkdude16:07:04

Cool. I'll go with this then

danieroux14:07:29

@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.

dominicm16:07:16

I think this is sensible. I did the same.

borkdude16:07:39

We do sort of the same right now

bhauman15:07:20

Everyone should hold off installing Big Sur as it breaks file watching in Figwheel https://github.com/bhauman/figwheel-main/issues/253