re: Hide 🙈 all console logs in production with just 3 lines of code VIEW POST


That is one way to do it, and it certainly is simple. However, you're still shipping the code that makes those calls in the first place.

To address that, one could take advantage of the bundling process to strip out all those calls in the first place. For example, it looks like UglifyJS supports conditional compiling that will help with that.

Code of Conduct Report abuse