Update TypeScript configurations and build process for BFF module

- Set entry file in nest-cli.json and disabled output directory deletion.
- Updated tsconfig.build.json to extend from tsconfig.base.json and refined compiler options.
- Modified tsconfig.json to extend from tsconfig.base.json and removed unnecessary overrides.
- Adjusted manage.sh script to build BFF using TypeScript compiler directly.
This commit is contained in:
T. Narantuya 2025-08-30 17:11:10 +09:00
parent cde7cb3e3c
commit 67c763016d
5 changed files with 40 additions and 28 deletions

View File

@ -2,10 +2,12 @@
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"entryFile": "main",
"compilerOptions": {
"deleteOutDir": true,
"deleteOutDir": false,
"watchAssets": true,
"assets": ["**/*.prisma"],
"tsConfigPath": "tsconfig.build.json"
"tsConfigPath": "./tsconfig.build.json",
"builder": "tsc"
}
}

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"target": "ES2024",
"lib": ["ES2024"],
"module": "CommonJS",
"moduleResolution": "node",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictBindCallApply": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": false,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true,
"skipLibCheck": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false
}
}

View File

@ -1,19 +1,18 @@
{
"extends": "./tsconfig.json",
"extends": "./tsconfig.base.json",
"compilerOptions": {
"noEmit": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"incremental": true,
"tsBuildInfoFile": "./tsconfig.build.tsbuildinfo",
"outDir": "./dist",
"sourceMap": true,
"declaration": false,
"module": "CommonJS",
"target": "ES2024"
"removeComments": true,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "test", "**/*.spec.ts"]
}
}

View File

@ -1,27 +1,13 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.base.json",
"compilerOptions": {
// NestJS overrides
"module": "CommonJS",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
// Build settings
"outDir": "./dist",
"baseUrl": "./",
"removeComments": true,
"target": "ES2024",
// Path mappings
"paths": {
"@/*": ["src/*"]
},
// NestJS-specific adjustments
"strictPropertyInitialization": false, // DTOs use decorators, not initializers
"noImplicitOverride": false
}
},
"include": ["src/**/*", "test/**/*"],
"exclude": ["node_modules", "dist"]
}
}

View File

@ -108,7 +108,8 @@ start_apps() {
# Build BFF first to ensure dist directory exists for watch mode
log "🔨 Building BFF for initial setup..."
pnpm --filter @customer-portal/bff build
cd "$PROJECT_ROOT/apps/bff" && pnpm tsc -p tsconfig.build.json
cd "$PROJECT_ROOT"
# Show startup information
log "🎯 Starting development applications..."