Fork me on GitHub
#clojurescript
<
2023-08-11
>
maleghast10:08:29

This may be a dumb question, but does anyone know what the deal is in terms of the “current hotness” for CLJS -> Node, since Lumo appears to have halted development..? I’d like to have a solid grasp of how I could leverage CLJS to deliver NodeJS code as more and more jobs are asking for NodeJS and while I’ve written a bunch of JS with CLJS for the Browser, I am not clear on the current lay of the land for the emission of back-end JavaScript

mmer11:08:03

Have you considered nbb?

delaguardo11:08:07

shadow-cljs offers :node-library, :node-script and :npm-module as available targets to compile CLJS.

maleghast11:08:06

@U4C3ZU6KX - I have considered and indeed used nbb, and I like it a lot, but I want to be able to have a finished artifact that will “look like” optimised or even unoptimised, readable JavaScript. nbb (in my expereince so far) leaves one with CLJS files that look and feel like Clojure / Clojurescript.

maleghast11:08:56

@U04V4KLKC - Thanks, I will look into that further - my CLJS experience is so out of date I don’t think I’ve ever looked into shadow-cljs, even though I’ve heard good things.

seancorfield15:08:37

Also take a look at squint and/or cherry from borkdude for standalone cljs -> js compilers.

hifumi12318:08:48

note :npm-module target is softly depressed in favor of using :esm or external js provider. also doesnt support code splitting

hifumi12318:08:17

if i had to target node.js i would use shadow with :target :esm

hifumi12318:08:26

pretty much everyone uses shadow these days, and legacy cljs codebases are likely to use figwheel or lein-cljsbuild. ive been using cljs daily for a year now and ive been able to avoid having to use anything that is not shadow

maleghast18:08:00

Thanks 🙏 I will definitely take a much closer look at Shadow tomorrow. Right now I am at the movies with my kids 😊

😆 2