This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-01
Channels
- # announcements (10)
- # aws (1)
- # babashka (19)
- # beginners (104)
- # calva (50)
- # cider (17)
- # cljs-dev (135)
- # cljsrn (56)
- # clojure (240)
- # clojure-dev (4)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-uk (7)
- # clojurescript (22)
- # conjure (2)
- # css (1)
- # cursive (10)
- # data-science (1)
- # datomic (60)
- # emacs (2)
- # events (2)
- # exercism (1)
- # figwheel-main (3)
- # fulcro (13)
- # graalvm (5)
- # gratitude (1)
- # inf-clojure (4)
- # introduce-yourself (5)
- # jobs-discuss (21)
- # lsp (36)
- # malli (6)
- # meander (8)
- # missionary (12)
- # off-topic (14)
- # pathom (13)
- # pedestal (10)
- # polylith (42)
- # re-frame (5)
- # reagent (12)
- # reitit (3)
- # releases (8)
- # sci (10)
- # shadow-cljs (37)
- # sql (5)
- # tools-deps (6)
Is a :closure-defines
value in shadow-cljs.edn
able to be dynamic? By that I mean if I change it and force compile (or not) should the runtime pick up the change? I know these goog-define vars are compile time, but as there's continuous compilation with shadow-cljs I hoped I could change a value on the fly while developing (leaving it strictly at its default when not). I've got one that doesn't seem to be dynamic at the moment, but I'll try harder if I know they can be...
When building my reagent-sources with shadow-cljs, I am seeing this warning that I don’t understand. r/atom
is used in many places, but only this one occurrence is marked and I cannot get the warning to go away. Is this a bug or am I just not able to see the error?
@javahippie thats odd indeed. I assume you have proper (:require [reagent.core :as r])
in your ns
?
Yes, that’s the whole :require
that is extremely odd indeed. especially given that it only warns after the third use
Ah, that was exactly the issue, thanks a lot!
Since 2.15.5 the following command is producing an error
npx shadow-cljs -A:build:test compile test --config-merge '{:autorun false}'
Error building classpath. Specified aliases are undeclared: [:-A]
It doesn’t quite make sense to me since it looks like the aliases aren’t passed at all. Was there any change in shadow that could cause this?It does appear to download a lot of dependencies but I’m not seeing a log that shows the clojure
invocation
ah thought it would log that. it'll run clojure -A:build:test -M -m shadow.cljs.devtools.cli watch app
(for shadow-cljs watch app
)
does that work when you run it? unsure what else would be happening? there only was an unrelated change in the npm script recently?
import LogRocket from 'logrocket';
would translate to (:require ["logrocket" :default LogRocket])
correct?
@drewverlee nowadays you can also use ["logrocket$default" :as logrocket]
with the usual caveats https://shadow-cljs.github.io/docs/UsersGuide.html#_about_default_exports
reading and ty.
Has anyone run into this error?
Must use import to load ES Module: /Users/toor/mutesync/shells/electron/node_modules/node-fetch/src/index.js
require() of ES modules is not supported.
@currentoor This is how to do it with nbb
:
npm install -g nbb
npm install node-fetch
fetch.cljs:
(ns fetch
(:require ["node-fetch$default" :as fetch]))
(-> (fetch "")
(.then #(.text %))
(.then prn))
nbb fetch.cljs
And this should be similar when using shadow-cljs
with :esm
targetthank you @U04V15CAJ, what is nbb
?
i don’t see this technique documented in the shadow-cljs dev guide
is it a temporary workaround or a standard API?
The :esm
target is currently undocumented. This is how you can use it:
https://gist.github.com/borkdude/7e548f06fbefeb210f3fcf14eef019e0
There is also this: https://clojureverse.org/t/generating-es-modules-browser-deno/6116
ah i see
thank you