Put in the right magic around `:advanced` Dead Code Elimination

This commit is contained in:
Mike Thompson 2016-08-19 15:07:06 +10:00
parent dd8bc250fb
commit 0514e06d0c
1 changed files with 4 additions and 2 deletions

View File

@ -9,9 +9,11 @@
(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
(def ^:boolean debug-enabled? "@const  @define {boolean}" js/goog.DEBUG)
(def ^boolean DEBUG? "@define {boolean}" ^boolean js/goog.DEBUG)
(defn ratom [x]
(reagent.core/atom x))