最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Disable console.log and all other console entries via Webpack? - Stack Overflow

programmeradmin7浏览0评论

Is it possible to prevent console.log and the like from being used at runtime by patching them using Webpack?

I know this could be done at runtime, and some obfuscators also seem to manage to do it via AST at compile time, but is there a standalone approach I could use in Webpack?

I've tried an obfuscator for this, but unfortunately it increases the size of our code by 20% just to disable console, which is more than all the obfuscation methods it uses for the rest of the code add. I don't know what's going on there, but so I'm wondering about a standalone approach.

发布评论

评论列表(0)

  1. 暂无评论