npm run build remove console
s0babeljs0io.icopy.site/docs/en/bab…
Installation
npm install babel-plugin-transform-remove-console --save-dev
Usage
babel.config.js
const plugins = ['@vue/babel-plugin-transform-vue-jsx'] if (process.env.NODE_ENV === 'production') { plugins.push('transform-remove-console') } module.exports = { plugins: plugins, presets: [ [ '@vue/app' ] ] }
minity to js
Installation
npm install uglifyjs-webpack-plugin --save-dev
Usage
vue.config.js
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') module.exports = { configureWebpack: { optimization: { minimizer: [new UglifyJsPlugin()] } } }