Fork me on GitHub
#shadow-cljs
<
2020-07-23
>
benny20:07:16

trying to use :closure-defines like https://shadow-cljs.github.io/docs/UsersGuide.html#closure-defines but nothing seems to change, is there something I’m doing wrong?

; shadow-cljs.ed
...
:builds {:dev
          {:target :react-native
           :closure-defines {client.home/foo "bar"}

; client/home.cljs
(def foo "Hayea!")

...
[rn/text {:style ui/header-style} foo]
...

thheller20:07:03

@benny you need to use (goog-define foo "default"). a regular def does nothing with regards to closure-defines.

benny20:07:18

ahh thank you!

colinkahn23:07:09

This is perhaps a weird question, but is there a way to output javascript in shadow-cljs that doesn’t target either the browser or node? Specifically I’m looking to target https://github.com/dop251/goja