From 7c443c6ea21d9406b22e1b44a8d989929b37ae7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=8F=8C=E5=96=9C?= <1415466602@qq.com> Date: Tue, 24 Jun 2025 23:30:45 +0800 Subject: [PATCH] 355345 --- .drone.yml | 2 +- .env.production | 2 +- vite.config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index bbe2ce3..15008ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,7 +23,7 @@ steps: from_secret: cos_secret_key bucket_url: https://files-1302416092.cos.ap-shanghai.myqcloud.com source: dist - target: / + target: /test strip_prefix: dist # 第三步:部署到服务器 diff --git a/.env.production b/.env.production index 8957b0f..462753f 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -VITE_PUBLIC = https://cdn.files.zguiy.com/static/ \ No newline at end of file +VITE_PUBLIC = https://cdn.files.zguiy.com/ \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 24f4d19..12b93c5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,7 +6,7 @@ export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()); return { - base: './', //打包后的相对路径 + base: env.VITE_PUBLIC || './', //使用环境变量设置资源路径,默认为相对路径 server: { host: true,