forked from varrff/nCommunityThreeJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
29 lines (28 loc) · 695 Bytes
/
Copy pathvue.config.js
File metadata and controls
29 lines (28 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const { defineConfig } = require('@vue/cli-service')
const TerserPlugin = require('terser-webpack-plugin')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
devServer: {
hot: false,
liveReload: false,
},
configureWebpack: (config) => {
if (process.env.NODE_ENV === 'production') {
config.optimization = {
minimizer: [
new TerserPlugin({
terserOptions: {
compress: {
drop_console: true, // 去除console.log
},
output: {
comments: false, // 删除注释
},
},
}),
],
}
}
},
})