This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-12
Channels
- # adventofcode (80)
- # announcements (11)
- # babashka-sci-dev (6)
- # beginners (52)
- # calva (144)
- # clj-kondo (28)
- # cljdoc (2)
- # cljs-dev (7)
- # clojure (120)
- # clojure-dev (28)
- # clojure-europe (36)
- # clojure-nl (1)
- # clojure-norway (16)
- # clojure-uk (3)
- # clojurescript (1)
- # cursive (4)
- # datomic (14)
- # figwheel-main (5)
- # fulcro (23)
- # hoplon (2)
- # hyperfiddle (46)
- # improve-getting-started (10)
- # jobs (1)
- # joyride (1)
- # leiningen (10)
- # malli (5)
- # nbb (5)
- # off-topic (21)
- # polylith (7)
- # portal (15)
- # practicalli (1)
- # rdf (18)
- # re-frame (3)
- # releases (2)
- # remote-jobs (5)
- # shadow-cljs (25)
- # spacemacs (4)
- # tools-deps (16)
- # tree-sitter (1)
Is there way to use npm git deps that has jsx code which gets automatically processed during import?
Never mind, my goal was for the most efficient way to import a UI component lib into my cljs app locally for dev. I read the docs and seems it isn’t possible. I’ll need to somehow manually process the files via babel (which I already do for some local jsx).
Never mind, my goal was for the most efficient way to import a UI component lib into my cljs app locally for dev. I read the docs and seems it isn’t possible. I’ll need to somehow manually process the files via babel (which I already do for some local jsx).
Does shadow-cljs cache files inside node_modules? I’m watching a build on a js lib that updates the package but the changes aren’t reflected on the cljs app. The js package is npm linked to the cljs app.
Hello all, I'm trying to import like this
import Split from '@uiw/react-split'; -> ["@uiw/react-split$default" :as Split] ?
but this Split
is returning nil.> This table only applies if the code you are consuming is packaged as actual ES6+ code. If the code is packaged as CommonJS instead the $default may not apply. See the section below for more info.
is it possible to specify not to parse deps when using :esm
target with runtime :react-native
?
My understanding was that traditional :react-native
target would let metro process deps, but seems that the runtime does not behave that way
I was seeing if it was possible to use shadow-cljs with expo-router, which requires integrating cljs into file-system routing which is why I’m using esm
target
I didn't try but see https://shadow-cljs.github.io/docs/UsersGuide.html#_third_party_tool_integration
but esm can't output files into different dirs, so this likely won't work for what you are trying to do
so using js-provider
does work, resolving dependency issue
but now when using import I’m seeing
dist/cljs-runtime/cljs_env.js: dist/cljs-runtime/cljs_env.js:Invalid call at line 1394: import(x.startsWith("./") ? "." + x : x)
full line referenced above
globalThis.shadow_esm_import = function(x) { return import(x.startsWith("./") ? "." + x : x); }
not sure why it’s an invalid calli think you’ve said in past that shadow-cljs does not play well with nextjs-like FS routing. but it does seem to be way JS is headed, as expo’s new router uses FS as well.
with esm
target do you think it’s more feasible?
I was excited about Cherry providing better interop with JS ecosystem, but also recently learned about esm target in shadow-cljs, which servers similar purpose. One distinction may be that in Cherry cljs logic is imported in shared in npm package, but other than I imagine behavior is similar
but as I said before the fs based routing thing just doesn't map to CLJS well at all
so you are probably better off writing the "route" files yourself in JS, and then just importing the CLJS code from there
Yeah that’s what I intended to do, at least to start i guess you mean it’s not an ideal experience, not that it’s not tenable
ah ok, regarding import issue dynamic es6 imports are not supported in metro https://github.com/facebook/metro/issues/52
ah ok, regarding import issue dynamic es6 imports are not supported in metro https://github.com/facebook/metro/issues/52