This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-05
Channels
- # announcements (2)
- # babashka (19)
- # beginners (14)
- # biff (10)
- # calva (23)
- # clojure (49)
- # clojure-europe (15)
- # clojure-nl (3)
- # clojure-norway (25)
- # clojure-seattle (1)
- # clojure-uk (4)
- # clojurescript (7)
- # data-science (6)
- # datahike (3)
- # datomic (1)
- # emacs (13)
- # events (2)
- # fulcro (3)
- # graalvm (13)
- # hyperfiddle (32)
- # leiningen (4)
- # lsp (38)
- # malli (1)
- # missionary (34)
- # nbb (28)
- # off-topic (42)
- # other-languages (5)
- # portal (8)
- # practicalli (1)
- # re-frame (3)
- # releases (1)
- # ring (7)
- # shadow-cljs (13)
- # sql (3)
:node-script
by default doesn't bundle any dependencies and lets node load them at runtime. so yes, this should work fine.
That's great news, thank you. I'm not quite at the point of trying it yet, but I'm optimistic.
I'm trying to use a wasm library (again) via shadow-cljs and an external bundler. I had this working before with quite a lot of help from @thheller -- and the asynchronously loaded module basically shows up as a promise, which we subsequently accessed with js-await
...
Now I have a different kind of import I want to do, and I'm wondering how to do that.
Previously, my argument to require
was just like this:
["@automerge/automerge" :as am-async]
Now I want to translate this kind of import statement:
import { next } from "@automerge/automerge";
The shadow-cljs docs say that would be like:
(require ["@automerge/automerge" :refer (next)])
But I suspect that isn't correct anymore due to the async module loading and promise stuff.It looks like if I take the module mod
that comes into js-await
, I can access (.-next mod)
and maybe that's it?