From 9793734fdc73c0f3707ffcd74e1a0605eeebd77a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Apr 2023 00:02:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Vue3=20stage=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E7=94=A8=E4=BA=8E=E6=BC=94=E7=A4=BA=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E7=9A=84=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.stage | 31 +++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 32 insertions(+) create mode 100644 .env.stage diff --git a/.env.stage b/.env.stage new file mode 100644 index 00000000..d7157fbb --- /dev/null +++ b/.env.stage @@ -0,0 +1,31 @@ +# 生产环境 +NODE_ENV=production + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' + +# 上传路径 +VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/' + +# 输出路径 +VITE_OUT_DIR=dist-stage diff --git a/package.json b/package.json index 4dbca411..dce5244d 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "ts:check": "vue-tsc --noEmit", "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", + "build:stage": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode stage", "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", "build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front",