This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-07
Channels
- # announcements (2)
- # asami (2)
- # babashka (15)
- # babashka-sci-dev (31)
- # beginners (130)
- # boot (4)
- # cider (5)
- # circleci (12)
- # clj-kondo (10)
- # cljs-dev (8)
- # clojure (7)
- # clojure-czech (14)
- # clojure-europe (19)
- # clojure-france (5)
- # clojure-uk (2)
- # clojured (23)
- # clojurescript (11)
- # conjure (8)
- # datomic (5)
- # emacs (1)
- # etaoin (8)
- # events (2)
- # fulcro (10)
- # graalvm (18)
- # gratitude (1)
- # holy-lambda (16)
- # honeysql (4)
- # introduce-yourself (1)
- # jobs (2)
- # kaocha (3)
- # london-clojurians (1)
- # lsp (53)
- # off-topic (16)
- # other-languages (2)
- # pathom (4)
- # pedestal (3)
- # podcasts-discuss (1)
- # portal (10)
- # re-frame (69)
- # reitit (2)
- # shadow-cljs (11)
- # vim (7)
- # xtdb (29)
I'm having issues with the cljs node REPL and an ESM lib. is there an issue tracking that already?
@lilactown shadow supports ESM with :target :esm
- also if you're using Node.js + ESM you might be interested in #nbb - AFAIK the vanilla CLJS compiler doesn't support ESM on Node.js yet
@lilactown More to your question, there is an issue here: https://clojure.atlassian.net/browse/CLJS-3325
1
@lilactown Having said that you might be able to use dynamic import inside a non-ESM target
Hmm, not sure what this is:
$ clj -M:cljs -m cljs.main -re node
ClojureScript 1.11.54
cljs.user=> (def js-import (js/eval "(x) => { return import(x); }"))
#'cljs.user/js-import
cljs.user=> (.catch (js-import "fs") prn)
#object[Promise [object Promise]]
cljs.user=> #object[TypeError TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified.]