-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
44 lines (40 loc) · 954 Bytes
/
index.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
35
36
37
38
39
40
41
42
43
44
// 开发
const dev = {
NODE_ENV: 'development', // 在webpack中它的用途是判断生产环境或开发环境的依据
url: { // 自定义api前缀(在webpack的插件DefinePlugin中配置为URL,即可在项目中直接URL.baseURL来使用)
baseURL: '"http:https://localhost:3004"', // 默认api前缀
otherURL: '"http:https://localhost:3002"', // 其他api前缀
// baseURL: '"https://api.bstu.cn"',
// otherURL: '"https://api.bstu.cn"',
}
};
// 测试
const test = {
NODE_ENV: 'production',
url: {
baseURL: '"http:https://localhost:3004"',
otherURL: '"http:https://localhost:3002"',
}
};
// 预发
const prod = {
NODE_ENV: 'production',
url: {
baseURL: '"http:https://localhost:3004"',
otherURL: '"http:https://localhost:3002"',
}
};
// 线上
const live = {
NODE_ENV: 'production',
url: {
baseURL: '"https://api.bstu.cn"',
otherURL: '"https://api.bstu.cn"',
}
};
module.exports = {
dev,
test,
prod,
live
};