From f3aaf89d2539427d879ae6b12de48e2dd0d64d43 Mon Sep 17 00:00:00 2001 From: Volankey <935196116@qq.com> Date: Thu, 21 Aug 2025 20:51:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8A=E4=BC=A0=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=B6=E6=8A=9B=E5=87=BA=E9=94=99=E8=AF=AF&=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=20cdn=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/uploadAssets2volOSS.ts | 1 + vite.config.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/uploadAssets2volOSS.ts b/scripts/uploadAssets2volOSS.ts index 48cdb1d..5c56ed1 100644 --- a/scripts/uploadAssets2volOSS.ts +++ b/scripts/uploadAssets2volOSS.ts @@ -90,6 +90,7 @@ async function uploadFile(filePath: string, basePath: string): Promise { console.log(`上传成功: ${key}, 请求ID: ${response.requestId}`); } catch (error) { console.error(`上传文件 ${filePath} 失败:`, error); + throw error; } } diff --git a/vite.config.js b/vite.config.js index 4c3f8b1..19234ca 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,8 +4,8 @@ import { fileURLToPath, URL } from 'node:url' import fs from 'fs' export default defineConfig({ - // base: process.env.NODE_ENV === 'production' ? 'https://cdn.kdesign.top/' : '/', - base: '/', + base: process.env.NODE_ENV === 'production' ? 'https://cdn.kdesign.top/' : '/', + // base: '/', plugins: [ vue(), // 添加自定义中间件来处理根路径