Put in the right magic around `:advanced` Dead Code Elimination
This commit is contained in:
parent
dd8bc250fb
commit
0514e06d0c
|
@ -9,9 +9,11 @@
|
||||||
|
|
||||||
(def after-render reagent.core/after-render)
|
(def after-render reagent.core/after-render)
|
||||||
|
|
||||||
;; make sure the Google Closure compiler see this as a boolean constatnt
|
;; Make sure the Google Closure compiler sees this as a boolean constatnt,
|
||||||
|
;; otherwise Dead Code Elimination won't happen in `:advanced` builds.
|
||||||
|
;; Type hints have been liberally sprinkled.
|
||||||
;; https://developers.google.com/closure/compiler/docs/js-for-compiler
|
;; https://developers.google.com/closure/compiler/docs/js-for-compiler
|
||||||
(def ^:boolean debug-enabled? "@const @define {boolean}" js/goog.DEBUG)
|
(def ^boolean DEBUG? "@define {boolean}" ^boolean js/goog.DEBUG)
|
||||||
|
|
||||||
(defn ratom [x]
|
(defn ratom [x]
|
||||||
(reagent.core/atom x))
|
(reagent.core/atom x))
|
||||||
|
|
Loading…
Reference in New Issue