Skip to content

Commit 9793734

Browse files
committed
增加 Vue3 stage 配置,用于演示环境的部署
1 parent f3869aa commit 9793734

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.env.stage

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 生产环境
2+
NODE_ENV=production
3+
4+
VITE_DEV=false
5+
6+
# 请求路径
7+
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
8+
9+
# 上传路径
10+
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
11+
12+
# 接口前缀
13+
VITE_API_BASEPATH=
14+
15+
# 接口地址
16+
VITE_API_URL=/admin-api
17+
18+
# 是否删除debugger
19+
VITE_DROP_DEBUGGER=true
20+
21+
# 是否删除console.log
22+
VITE_DROP_CONSOLE=true
23+
24+
# 是否sourcemap
25+
VITE_SOURCEMAP=false
26+
27+
# 打包路径
28+
VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
29+
30+
# 输出路径
31+
VITE_OUT_DIR=dist-stage

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"ts:check": "vue-tsc --noEmit",
1212
"build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro",
1313
"build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev",
14+
"build:stage": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode stage",
1415
"build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test",
1516
"build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static",
1617
"build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front",

0 commit comments

Comments
 (0)