Skip to content

Commit 1042c34

Browse files
committed
build: update vercel build configuration to include compiled nest artifacts and prisma dependencies
1 parent 2341f2d commit 1042c34

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

api/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { IncomingMessage, ServerResponse } from 'node:http';
22
import serverlessHttp from 'serverless-http';
3-
import { createApp } from '../src/create-app';
3+
// Import from pre-built dist — compiled by `nest build` in vercel-build step
4+
// eslint-disable-next-line @typescript-eslint/no-require-imports
5+
const { createApp } = require('../dist/create-app') as { createApp: () => Promise<import('@nestjs/platform-express').NestExpressApplication> };
46

57
type ServerlessHandler = (
68
req: IncomingMessage,

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"outputDirectory": ".",
55
"functions": {
66
"api/index.ts": {
7-
"includeFiles": "web-ui/dist/**",
7+
"includeFiles": "{dist/**,web-ui/dist/**,node_modules/.prisma/**,node_modules/@prisma/client/**}",
88
"memory": 1024,
99
"maxDuration": 30
1010
}

0 commit comments

Comments
 (0)