config.js
1.34 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module.exports = {
admin: {
dev: {
env: "development",
publicPath: "/",
host: "localhost",
port: "8090",
assetsSubDirectory: "static",
devtoolType: "eval-cheap-module-source-map",
proxyTable: {
"/admin_api": {
target: "http://localhost:3000/admin_api/",
changeOrigin: true,
pathRewrite: {
"^/admin_api": "/",
},
},
},
},
build: {
env: "production",
publicPath: "./", // html引用资源路径
assetsPath: "static", // 静态资源目录
assetsSubDirectory: "static", // html资源存放目录
devtoolType: "source-map", // 代码位置信息
},
},
client: {
dev: {
env: "development",
publicPath: "/",
host: "localhost",
port: "8080",
assetsSubDirectory: "static",
devtoolType: "eval-cheap-module-source-map",
proxyTable: {
"/client_api": {
target: "http://localhost:3000/client_api/",
changeOrigin: true,
pathRewrite: {
"^/client_api": "/",
},
},
},
},
build: {
env: "production",
publicPath: "./",
assetsPath: "static",
assetsSubDirectory: "static",
devtoolType: "source-map",
},
},
};