Desired feature: If the :closure-defines compiler option is set, then, upon setup (or perhaps first eval for a given environment where not yet set) Figwheel should set js/goog.global.CLOSURE_UNCOMPILED_DEFINES with a JavaScript object formed from the supplied map so that goog-define works.
Here is an example of working around this directly in the Figwheel REPL, just to illustrate how the feature works:
ios:cljs.user=> (set! js/goog.global.CLOSURE_UNCOMPILED_DEFINES #js {"foo.core.bar" 11})
#js {"foo.core.bar" 11}
ios:cljs.user=> (ns foo.core)
ios:foo.core=> (goog-define bar 10)
nil
ios:foo.core=> bar
11
Here are examples of how this is implemented in the base REPLs that ship with ClojureScript:
I've tested this in a project crated using lein new figwheel hello-world and it works. This is actually not an issue with Figwheel, but in downstream re-natal: https://github.com/drapanjanas/re-natal/issues/46
Desired feature: If the
:closure-defines
compiler option is set, then, upon setup (or perhaps first eval for a given environment where not yet set) Figwheel should setjs/goog.global.CLOSURE_UNCOMPILED_DEFINES
with a JavaScript object formed from the supplied map so thatgoog-define
works.Here is an example of working around this directly in the Figwheel REPL, just to illustrate how the feature works:
Here are examples of how this is implemented in the base REPLs that ship with ClojureScript:
Node, Browser, Nashorn