Closed ForbesLindesay closed 8 years ago
We shouldn't do it at all.
The only case in which it is used so far is for demos that require a specific JS feature to be available in the browser. It is indeed a terrible hack, so I sought to limit the usage of the code to only Node.js by using NODE_ENV, which ended up being broken (and thus removed).
https://github.com/pugjs/pug-www/blob/7e482bbfefd2de3007512fa846688dbfc3864368/src/components/pug-preview.js#L125-L128
It seems like either we want this everywhere, or not at all.