8000 disable console log · pycoder404/blog-vue@992f3ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 992f3ea

Browse files
committed
disable console log
1 parent c22ebce commit 992f3ea

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

babel.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
const prodPlugins = []
2+
if (process.env.NODE_ENV === 'production'){
3+
prodPlugins.push('transform-remove-console')
4+
}
15
module.exports = {
26
presets: [
37
'@vue/cli-plugin-babel/preset'
8+
],
9+
plugins: [
10+
...prodPlugins
411
]
512
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@element-plus/icons-vue": "^2.0.6",
1313
"@highlightjs/vue-plugin": "^2.1.0",
1414
"axios": "^0.26.1",
15+
"babel-plugin-transform-remove-console": "^6.9.4",
1516
"core-js": "^3.8.3",
1617
"element-plus": "^2.2.21",
1718
"express": "^4.18.2",

0 commit comments

Comments
 (0)
0