JSFiddle - React, Tailwind, and code Playground

by __defineGetter__

JavaScript

if(typeof window.console === 'undefined') {
    window.console = {
        log: function() {}
        // etc, define all the methods for which you will call
        // while developing.. warn, debug..
    }
}
var CONSOLE = window.console.log;
window.console.log = function() {
    if(typeof window.__DEV__ != 'undefined') {
         return CONSOLE.apply(this, arguments);
    }
}

console.log("In production", "HEy"); // nothing