This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-08
Channels
- # announcements (1)
- # babashka (39)
- # beginners (44)
- # clj-kondo (10)
- # cljdoc (24)
- # clojure (49)
- # clojure-austin (2)
- # clojure-berlin (6)
- # clojure-europe (13)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (1)
- # core-async (11)
- # cursive (7)
- # datahike (3)
- # datalevin (2)
- # fulcro (1)
- # hyperfiddle (40)
- # jobs (12)
- # juxt (5)
- # lsp (9)
- # nyc (1)
- # off-topic (27)
- # re-frame (7)
- # releases (3)
- # shadow-cljs (9)
- # timbre (6)
- # xtdb (2)
- # yamlscript (1)
i'm trying to import this package
["@zerodevapp/sdk" :refer [getZeroDevSigner]]
but i'm getting this error:
AssertionError Assert failed: (str/starts-with? rel-require "./")
am i not importing the package correctly?(updating to the latest version of shadow to make sure...)
hum now the build is not returning an error 🙃 (i was using shadow 2.18)
I'm trying to build a macro around Web Components. Specifically, generating them from hiccup-like structure. I have a macro that generates Web Components class, but the problem that there is no way to redefine Web Component without page refresh (Browser limitation). I'm thinking about workaround that generates a new name for component within macro during development builds (e.g. instead of hello-world it will generate and register new version hello-world-v1, hello-world-v2, etc.) , but I can't figure out how to understand within macro if a build is a development one or a production one? Is it solvable or I'm better off just reloading a page with some build hooks?
web components arent reloadable and you will need to somehow keep track of everything you have rendered. you may be able to construct a map associating names to counters somehow, but the hard part really is replacing existing components
yeah, that's annoying.... I was thinking of rebuilding DOM with new component names once they're replaced. I think about injecting state from a global atom, so that might work...
in the macro you can check the (:shadow.build/mode &env)
value. it'll be :release
for release builds, :dev
otherwise.
Thank you! That's exactly what I was looking for!