上线后 console.log 还会打印吗
发布于 5 年前 作者 yuanlei 1533 次浏览 来自 问答

上线后 console.log 还会打印吗 太多 console.log 应该会影响到一些性能 但又不想删来删去。。

是否有一个可配置 是否打印console.log 的功能

2 回复

正式版不会打

可以把console.log方法去置一下,发布前在js顶层写上这行: console.log=function(){ }; 这样就不会消耗性能了。

回到顶部