The console.log of the uniapp applet does not print in the WeChat developer tools

Recently, I was developing a uniapp applet, and found that the console.log does not print in the WeChat developer tools, but it can print out on the H5 page, so I searched for the reason on the Internet...

The main reason is that the vue.config.js file has a configuration to delete the console when it is released, as follows:
insert image description here
official website reference address: global file - vue.config.js
can be searched globally at this time, change drop_consolecompress.drop_console from true to false , and then Re-run the project into the WeChat developer tool and you can see the printout on the console.

Guess you like

Origin blog.csdn.net/qq_38970408/article/details/132058022