Remove assertion related codes on production environment
ktsn opened this issue · comments
Katashin commented
It would not worth implementing dedicated unassert-like tool, just use process.env.NODE_ENV !== 'production'
pattern is enough.
const module = {
state: { /* .... */ },
// ...
}
if (process.env.NODE_ENV !== 'production') {
module.assertions = { /* ... */ }
}
export default module