1.Vue CLI3 3.x config vue.config.js clears the console console after the project is packed

If the webpack.prod.conf.js file exists in the project, it can be directly found in webpack.prod.conf.js(production environment packaging configuration)

Plugins — >UglifyJsPlugin — >uglifyOptions

New UglifyJsPlugin({uglifyOptions: {uglifyOptions: {warnings: false, drop_console: true, // annotate console pure_funcs: ['console.log'] // Remove console}}Copy the code

2. Every company has a code specification. If the company is using eslint and the rules have been written, we can use the vscode plugin to format eslint

    "eslint.options": {                "configFile": "F:/ManageWeb/trunk/.eslintrc.js"            },
Copy the code