So I learned on #clojurescript that the above quest was futile, and that that is probably why figwheel hangs; figwheel-main
is simply incompatible with bundled webpack. So instead, I’ve switched to shadow-cljs for building, since this is compatible with the npm project I want to use; haven’t done much yet, but I’ve got my app back up and running, with code reloading, and with the npm lib properly connected. Happy so far!
I use figwheel with webpack all the time. I just haven’t been able to follow your whole structure enough to know your specifics.
The webpack cljs stuff is independent of figwheel
And I am fairly sure you can use react-dnd with normal cljs and figwheel. It’s a somewhat popular lib. But if you found something you prefer for now. That’s fine. I’m just commented on the “simply incompatible” part. Because don’t think that’s true.
@mikerod the new :bundle type is problematic
I think it's being worked on
Oh. This is cutting edge stuff. Is that the tutorial that was being referring to?
I didn’t realize the guides are already pushing beyond what fig main supports.
The traditional bundling approach via foreign-deps cljs compiler option is fine with lein-figwheel and figwheel-main
maybe https://clojurians-log.clojureverse.org/figwheel-main/2020-04-25/1587827227.053000 and https://clojurians-log.clojureverse.org/figwheel-main/2020-05-01/1588371827.127400 is of interest re bundle target
It isn’t even a concern of figwheel at all (the “old” foreign-libs webpack bundle way). The new :bundle option may be a different story.
Yeah. Thanks for links. I was under the impression. This just meant you can’t use the new bundle options yet. But thought you could continue to do it the “traditional way”. Hopefully!
You can, but the guide was updated
Mass confusion for new comers. Hah
Guess so 🙂
So I’m working on the new :bundle
target now and it should be ready by Wednesday for figwheel-main
. I’m getting lein figwheel
to work first, I’ve got it working already and plan on releasing it tomorrow.
This is a pretty big improvement overall for using npm modules. However its important to remember that it doesn’t hide you from having to deal with webpack. I get some seriously opaque errors and I basically had to retype the webpack.config.js
file and add on piece of config at a time until it worked correctly.
But the bottom line is you get npm modules and figwheel reloading and a repl for very little config