How to remove all console.log instructions from your miniature or combo javascript file

Iam using visual studio

Iam with javascript codes scattered in different files.

Currently iam using compressor below

http://yuicompressor.codeplex.com/

it generates output in the form of combined + mini files when building the project.

I am looking for a way to remove all console.log instructions from my codes in mini files. Please suggest me how to do this.

+4
source share
1 answer

Why not just do it:

window['console'] = { log: function() {} }; 

when you don't want the console.log instructions to do nothing?

+1
source

Source: https://habr.com/ru/post/1334516/


All Articles