How to close the console.log in the (vue/applet) project in the online environment

WeChat applet

The code is as follows, written in the first line of app.js; console.log is a reference function, replace an empty function, and the console.log printing function can be removed

console.log = __wxConfig.envVersion=='develop'?console.log: ()=> {
   
    
    };

vue-project

insert image description here

Plug-in address : https://www.npmjs.com/package/b

Guess you like

Origin blog.csdn.net/qq_47272950/article/details/129988936