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