核心修复: - 从 src 导入模块而非 dist(让 TypeScript 编译器处理) - vercel.json 路由指向构建后的 dist/api/index.js - 简化导入逻辑,移除动态路径拼接 - 本地构建测试通过 技术细节: - api/index.ts 从 ../src/app.module 导入 - NestJS 构建会将其编译到 dist/api/index.js - Vercel 执行构建后直接使用编译结果 - CORS 设置为 origin: true 允许所有来源 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| index.ts | ||