figwheel-main

figwheel-main http://figwheel.org
borkdude 2020-07-03T10:40:34.405Z

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

practicalli-john 2020-07-05T05:41:26.413500Z

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.

lepistane 2020-07-09T10:32:48.479200Z

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

dominicm 2020-07-03T12:27:27.405800Z

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

dominicm 2020-07-03T12:27:48.406200Z

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

👍 1
borkdude 2020-07-03T13:26:34.406400Z

it = figwheel main?

danieroux 2020-07-03T14:12:44.407100Z

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.

💯 3
danieroux 2020-07-03T14:16:29.409200Z

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

borkdude 2020-07-03T14:26:37.409300Z

yeah

borkdude 2020-07-03T14:26:40.409500Z

thanks!

bhauman 2020-07-03T15:54:20.411Z

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

bhauman 2020-07-03T15:55:02.411400Z

thanks @chancerussell

dominicm 2020-07-03T16:29:46.411700Z

Yah

borkdude 2020-07-03T16:30:04.411900Z

Cool. I'll go with this then

dominicm 2020-07-03T16:30:16.412100Z

I think this is sensible. I did the same.

borkdude 2020-07-03T16:31:39.412300Z

We do sort of the same right now