fix:添加打包后 删除 console。log
This commit is contained in:
@@ -13,6 +13,7 @@ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
|
||||
// const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')
|
||||
const fileManagerPlugin = require('filemanager-webpack-plugin')
|
||||
const WebpackZipPlugin = require('webpack-zip-plugin')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
// const GitRevisionPlugin = require('git-revision-webpack-plugin')
|
||||
const GenerateAssetPlugin = require('generate-asset-webpack-plugin')
|
||||
const WebpackShellPlugin = require('webpack-shell-plugin')
|
||||
@@ -63,19 +64,18 @@ if (arg === 'html') {
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': env
|
||||
}),
|
||||
// new ParallelUglifyPlugin({
|
||||
// cacheDir: '.cache/',
|
||||
// uglifyJS: {
|
||||
// output: {
|
||||
// comments: false
|
||||
// },
|
||||
// warnings: false,
|
||||
// compress: {
|
||||
// drop_debugger: true,
|
||||
// drop_console: true
|
||||
// }
|
||||
// }
|
||||
// }),
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
warnings: false,
|
||||
drop_console: true,
|
||||
pure_funcs: ['console.log']
|
||||
}
|
||||
},
|
||||
exclude: /manifest.+js/,
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
parallel: true
|
||||
}),
|
||||
// extract css into its own file
|
||||
new ExtractTextPlugin({
|
||||
filename: utils.assetsPath('css/[name].[contenthash].css'),
|
||||
@@ -207,19 +207,18 @@ if (arg === 'html') {
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': env
|
||||
}),
|
||||
// new ParallelUglifyPlugin({
|
||||
// cacheDir: '.cache/',
|
||||
// uglifyJS: {
|
||||
// output: {
|
||||
// comments: false
|
||||
// },
|
||||
// warnings: false,
|
||||
// compress: {
|
||||
// drop_debugger: true,
|
||||
// drop_console: true
|
||||
// }
|
||||
// }
|
||||
// }),
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
warnings: false,
|
||||
drop_console: true,
|
||||
pure_funcs: ['console.log']
|
||||
}
|
||||
},
|
||||
exclude: /manifest.+js/,
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
parallel: true
|
||||
}),
|
||||
// extract css into its own file
|
||||
new ExtractTextPlugin({
|
||||
filename: utils.assetsPath('css/[name].[contenthash].css'),
|
||||
|
||||
@@ -441,7 +441,6 @@ export default {
|
||||
},
|
||||
// 比较变量 图表是否显示/隐藏
|
||||
compareVariables () {
|
||||
console.log(123123123123)
|
||||
if (!this.panelLock) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -555,10 +555,8 @@ export default {
|
||||
}
|
||||
})
|
||||
confirmReg = this.$loadsh.orderBy(confirmReg, function (item) { // 根据 匹配的name的长度排序 避免匹配的 $a 没匹配 $asset的问题
|
||||
console.log(item.name.length)
|
||||
return item.name.length
|
||||
}, 'desc')
|
||||
console.log(confirmReg)
|
||||
if (confirmReg.length) {
|
||||
confirmReg.forEach(item => {
|
||||
const reg = new RegExp('\\$' + item.name, 'g') // 后续需要考虑 item,name 使用特殊字符的问题
|
||||
|
||||
@@ -1504,7 +1504,6 @@ export default {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
console.log('11111')
|
||||
}
|
||||
},
|
||||
module: {
|
||||
|
||||
Reference in New Issue
Block a user