Skip to content

Commit 77d0ab6

Browse files
author
levy
committed
更新环境变量说明
1 parent af58f33 commit 77d0ab6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ mounted() {
4343
console.log(process.env.TESTING_VAR) // 输出 just-fot-testing
4444
}
4545
```
46+
**工程自带的环境变量**
47+
48+
```sh
49+
# axios的baseURL,可不传。不传时,则使用相对路径发送请求
50+
API_SERVER=
51+
# 对应webpack的publicPath,一定要/结尾
52+
PUBLIC_PATH=
53+
# 传1则不会有登录拦截
54+
NO_LOGIN=
55+
```
4656

4757
## 构建
4858

@@ -54,10 +64,9 @@ mounted() {
5464
yarn build
5565
```
5666

57-
构建默认需要传的环境变量有:
67+
构建必传的环境变量有:
5868

5969
```sh
60-
API_SERVER=
6170
PUBLIC_PATH=
6271
```
6372

0 commit comments

Comments
 (0)