forked from likaia/chat-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
34 lines (34 loc) · 1.03 KB
/
vue.config.js
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
30
31
32
33
34
module.exports = {
// 项目打包生成目录
outputDir: "/usr/local/Cellar/tomcat/9.0.41/libexec/webapps/chat-system/",
// 静态资源生成目录(相对于outputDir
assetsDir: "static",
// 关闭线上源码
productionSourceMap: false,
// css相关配置
// 图片在10kb以内使用内联base64图片
chainWebpack: config => {
config.module
.rule("images")
.use("url-loader")
.loader("url-loader")
.tap(options => Object.assign(options, { limit: 10240 }));
},
// 部署应用包时的基本 URL(解决build打包后资源文件404问题) :https://cli.vuejs.org/zh/config/#baseurl
publicPath: "./",
devServer: {
open: true,
compress: true,
port: 8020,
https: false,
hotOnly: false,
proxy: null
},
// 关闭生产环境console
configureWebpack(config) {
if (process.env.NODE_ENV === "production") {
// eslint-disable-next-line @typescript-eslint/camelcase
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true;
}
}
};