From faace8b691c931859d010893cb57ef7d7fa6bea1 Mon Sep 17 00:00:00 2001 From: CodeBuddy Attribution Bot Date: Wed, 29 Apr 2026 03:44:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(attribution):=20uploadFiles=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=84=E5=A4=8D=E6=9D=82?= =?UTF-8?q?=E4=B8=94=E6=97=A0=E6=B3=95=E9=AA=8C=E8=AF=81=E9=9D=99=E6=80=81?= =?UTF-8?q?=E6=89=98=E7=AE=A1=E5=8F=AF=E8=AE=BF=E9=97=AE=E6=80=A7=20(issue?= =?UTF-8?q?=5Fmoizgwrc=5F0s6rbv)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/source/skills/web-development/SKILL.md | 22 ++++++++++++++++--- .../skills/web-development/frameworks.md | 21 ++++++++++++++++++ mcp/src/tools/hosting.ts | 4 ++-- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/config/source/skills/web-development/SKILL.md b/config/source/skills/web-development/SKILL.md index f13b3ebf..a8f1dbca 100644 --- a/config/source/skills/web-development/SKILL.md +++ b/config/source/skills/web-development/SKILL.md @@ -125,12 +125,28 @@ Use this section only when the Web project needs CloudBase platform features. - Do not move Web login logic into cloud functions - For provider readiness, login method setup, or publishable key issues, route to `auth-tool` and `auth-web` -### Static hosting defaults +### Static hosting deployment checklist + +**Before calling `uploadFiles`, MUST complete these checks for subdirectory deployment:** + +When deploying to a subdirectory (e.g., `cloudPath: 'vite-test'` instead of root `/`), AI MUST verify ALL of the following: + +1. **Build configuration updated**: The `base` (Vite), `publicPath` (Webpack), or `assetPrefix` MUST be set to the absolute path matching the deployment subdirectory: + - Example: Deploying to `/vite-test/` → Set `base: '/vite-test/'` in vite.config.ts + - **FORBIDDEN**: Using `'./'` (relative path) or `''` (empty string) - these cause 404 errors when URL is accessed without trailing slash + +2. **Project rebuilt**: After changing build configuration, MUST run `npm run build` (or equivalent) to regenerate the dist folder + +3. **Build output verified**: Check `dist/index.html` to confirm asset references have correct absolute path prefix: + - Correct: `