From 444037a50f8f4a877c6362ae9b773a5ec439d5d0 Mon Sep 17 00:00:00 2001 From: golc <2483469113@qq.com> Date: Wed, 4 Mar 2026 09:41:57 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8=20Vercel=20Functions?= =?UTF-8?q?=20API=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 builds 和 routes 配置 - 使用 functions 配置指定运行时 - 添加 buildCommand 确保构建 Co-Authored-By: Claude Sonnet 4.6 --- vercel.json | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/vercel.json b/vercel.json index c41475d..4990243 100644 --- a/vercel.json +++ b/vercel.json @@ -1,15 +1,9 @@ { "version": 2, - "builds": [ - { - "src": "package.json", - "use": "@vercel/node" + "buildCommand": "pnpm run build", + "functions": { + "api/*.ts": { + "runtime": "@vercel/node@3.0.0" } - ], - "routes": [ - { - "src": "/(.*)", - "dest": "/dist/api/index.js" - } - ] + } }