Fork me on GitHub
#cljsrn
<
2020-03-02
>
anson10:03:27

Hi folks, I'm trying to use :closure-defines in my setup with figwheel (0.5.18) and re-natal (0.11.1). Should adding keys to the :closure-defines map in project.clj and using goog-define in the usual way just work? This PR on re-natal (https://github.com/drapanjanas/re-natal/issues/46) suggests that this is the case, but it isn't documented and I've been wrestling with it for a while with no success. My expectation is that I have "env.config.uri": "" in my closure-defines map, and have (goog-define uri "default") in the env.config namespace, if I go to the Figwheel Clojurescript repl I will see env.config/uri evaluate to "http://example.com". Sanity check on my understanding of how to use :closure-defines with re-natal and that it should reflect in the figwheel repl would be appreciated 🙂 Thanks!

anson11:03:52

I've also tried the above with a namespace other than env.config to avoid being clobbered by the re-natal autogenerated file.