关键修复: - 使用 require() 而非 import() 动态加载编译后的模块 - 从 dist/src/ 路径加载模块(Vercel 构建后的路径) - 移除 tsconfig 中对 api 目录的排除 - 配置 vercel.json 路由到 dist/api/index.js 技术说明: - api/index.ts 会被编译到 dist/api/index.js - 运行时从 dist/src/app.module 加载 NestJS 应用 - 使用 require 避免 TypeScript 编译时路径检查 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| index.ts | ||