Commit eec0de52 authored by 李苏's avatar 李苏 💬

自动去除console

parent 22da8ed8
const proPlugins = ['dynamic-import-node','transform-remove-console'];
if (process.env.NODE_ENV === 'production') {
// proPlugins.push('transform-remove-console');
}
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
......@@ -7,7 +12,7 @@ module.exports = {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
'plugins': proPlugins
}
}
}
......@@ -8,7 +8,7 @@
"clear": "rmdir /s/q node_modules",
"serve": "node init && vue-cli-service serve",
"build": "vue-cli-service build",
"build:report":"vue-cli-service build --report",
"build:report": "vue-cli-service build --report",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"
......@@ -56,8 +56,8 @@
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"typescript": "^4.5.2",
"vue-class-component": "^7.2.3",
"vue": "2.6.12",
"vue-class-component": "^7.2.3",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-meta": "2.4.0",
......@@ -66,12 +66,12 @@
"vuex": "3.6.0"
},
"devDependencies": {
"vue-property-decorator": "^9.1.2",
"@vue/cli-plugin-babel": "4.4.6",
"@vue/cli-plugin-eslint": "4.4.6",
"@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"chalk": "4.1.0",
"compression-webpack-plugin": "5.0.2",
"connect": "3.6.6",
......@@ -84,6 +84,7 @@
"script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1",
"ts-loader": "~8.2.0",
"vue-property-decorator": "^9.1.2",
"vue-template-compiler": "2.6.12"
},
"engines": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment