Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://swc.rs/schema.json",
"sourceMaps": true,
"module": { "type": "commonjs" },
"jsc": {
"target": "es2023",
"parser": { "syntax": "typescript", "decorators": true, "dynamicImport": true },
"transform": { "legacyDecorator": true, "decoratorMetadata": true, "useDefineForClassFields": false },
"keepClassNames": true,
"baseUrl": "./",
"paths": { "src/*": ["./src/*"] }
}
}
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ COPY package*.json ./
ENV NODE_TLS_REJECT_UNAUTHORIZED='0'
RUN npm ci

COPY tsconfig*.json nest-cli.json ./
COPY tsconfig*.json nest-cli.json .swcrc ./
COPY src ./src

# Dev dependencies are only needed to build; the generated Prisma client
# under node_modules/.prisma survives the prune
RUN npm run build && npm prune --omit=dev
# SWC compiles without checking types, so the image is gated on the type
# check here, as tsc's build used to gate it. Dev dependencies are only needed
# to build; the generated Prisma client under node_modules/.prisma survives
# the prune
RUN npm run typecheck && npm run build && npm prune --omit=dev

FROM node:24-bookworm-slim
ENV NODE_ENV=production
Expand Down
7 changes: 6 additions & 1 deletion nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
"deleteOutDir": true,
"builder": {
"type": "swc",
"options": { "swcrcPath": ".swcrc" }
},
"typeCheck": false
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}
}
Loading