feat: experimental swc support

This commit is contained in:
midzelis 2025-07-19 14:08:36 +00:00 committed by Jason Rasmussen
parent 845b0f2073
commit 0167ec1668
No known key found for this signature in database
GPG key ID: 2EF24B77EAFA4A41
3 changed files with 10 additions and 4 deletions

View file

@ -5,6 +5,12 @@
"compilerOptions": {
"deleteOutDir": true,
"webpack": false,
"builder": {
"type": "swc",
"options": {
"extensions": [".js", ".ts", ".jsx", ".tsx"]
}
},
"plugins": [
{
"name": "@nestjs/swagger",

View file

@ -29,7 +29,7 @@
"migrations:run": "node ./dist/bin/migrations.js run",
"schema:drop": "node ./dist/bin/migrations.js query 'DROP schema public cascade; CREATE schema public;'",
"schema:reset": "npm run schema:drop && npm run migrations:run",
"sync:open-api": "node ./dist/bin/sync-open-api.js",
"sync:open-api": "nest build -b tsc && node ./dist/bin/sync-open-api.js",
"sync:sql": "node ./dist/bin/sync-sql.js",
"email:dev": "email dev -p 3050 --dir src/emails"
},
@ -119,7 +119,8 @@
"@nestjs/cli": "^11.0.2",
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.4",
"@swc/core": "^1.4.14",
"@swc/cli": "^0.7.8",
"@swc/core": "^1.13.0",
"@testcontainers/postgresql": "^11.0.0",
"@testcontainers/redis": "^11.0.0",
"@types/archiver": "^6.0.0",

View file

@ -12,7 +12,7 @@ import { ConfigRepository } from 'src/repositories/config.repository';
import { LoggingRepository } from 'src/repositories/logging.repository';
import { bootstrapTelemetry } from 'src/repositories/telemetry.repository';
import { ApiService } from 'src/services/api.service';
import { isStartUpError, useSwagger } from 'src/utils/misc';
import { isStartUpError } from 'src/utils/misc';
async function bootstrap() {
process.title = 'immich-api';
@ -37,7 +37,6 @@ async function bootstrap() {
app.enableCors();
}
app.useWebSocketAdapter(new WebSocketAdapter(app));
useSwagger(app, { write: configRepository.isDev() });
app.setGlobalPrefix('api', { exclude: excludePaths });
if (existsSync(resourcePaths.web.root)) {