-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
38 lines (38 loc) · 1.04 KB
/
vue.config.js
File metadata and controls
38 lines (38 loc) · 1.04 KB
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
35
36
37
38
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
publicPath: './',
// publicPath: process.env.NODE_ENV == "production" ? "/hgxlserp/" : './',
outputDir: "dist",
assetsDir: "static",
indexPath: "index.html",
filenameHashing: false,
lintOnSave: process.env.NODE_ENV !== "production",
runtimeCompiler: false,
productionSourceMap: false,
devServer: {
open: true, //是否自动弹出浏览器页面
host:"localhost",
port: 8088,
//跨越代理
proxy: {
// '/hgxlserp': {
// target: 'http://43.138.21.133', //API服务器的地址
// ws: true,
// changeOrigin: true,
// pathRewrite: {
// '^/hgxlserp': ''
// }
// },
'/pyamazon': {
target: 'http://43.138.21.133', //API服务器的地址
// target: 'http://127.0.0.1:8000', //API服务器的地址
ws: true,
changeOrigin: true,
pathRewrite: {
'^/pyamazon': ''
}
}
}
}
})