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(), // 添加自定义中间件来处理根路径