feat: 增加打包不同环境命令配置
This commit is contained in:
17
.env.test
Normal file
17
.env.test
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
|
||||
# WebSocket端点(可选)
|
||||
#VITE_APP_WS_ENDPOINT=wss://api.youlai.tech/ws
|
||||
|
||||
# 接口地址
|
||||
VITE_APP_BASE_API = 'https://tapi.cashier.sxczgkj.cn/'
|
||||
|
||||
|
||||
|
||||
|
||||
# WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws
|
||||
VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss
|
||||
|
||||
# 启用 Mock 服务
|
||||
VITE_MOCK_DEV_SERVER=false
|
||||
@@ -66,6 +66,13 @@ pnpm run dev
|
||||
# 项目打包
|
||||
pnpm run build
|
||||
|
||||
# 测试环境
|
||||
pnpm run build:test
|
||||
|
||||
# 正式环境
|
||||
pnpm run build:pro
|
||||
|
||||
|
||||
# 上传文件至远程服务器
|
||||
将本地打包生成的 dist 目录下的所有文件拷贝至服务器的 /usr/share/nginx/html 目录。
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit & vite build",
|
||||
"build:test": "vue-tsc --noEmit & vite build --mode test",
|
||||
"build:pro": "vue-tsc --noEmit & vite build --mode production",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
|
||||
Reference in New Issue
Block a user