I'm modeling a state machine in ClojureScript and am using clojure.spec to check invariants in each state.
However, I'd like to remove this checking in the production build, since it adds ~ 200kB minified code size and 100ms startup time.
I haven't been able to find a tidy way to do this --- this writeup explains the approaches I've considered and their tradeoffs.
Here's the current setup:
(ns app.state-machines.foo