**Problem:** - TypeScript was compiling .js files directly into src/ alongside .ts files - This broke the app and polluted source control with build artifacts **Solution:** 1. Moved socket-server.ts from root to src/socket-server.ts - Updated imports to remove './src/' prefix (now './lib/...') 2. Updated tsconfig.server.json: - Added rootDir: "./src" to ensure clean dist/ structure - Updated include path from "socket-server.ts" to "src/socket-server.ts" 3. server.js already correctly requires from ./dist/* **Result:** - TypeScript now compiles to dist/ with clean structure: - src/socket-server.ts → dist/socket-server.js ✓ - src/db/index.ts → dist/db/index.js ✓ - No dist/src/ subdirectory ✓ - No .js files created in src/ ✓ - Dev server starts successfully - Build artifacts properly separated from source code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
795 B
JSON
34 lines
795 B
JSON
{
|
|
"extends": "./tsconfig.json",
|
|
"compilerOptions": {
|
|
"module": "commonjs",
|
|
"target": "es2020",
|
|
"outDir": "./dist",
|
|
"rootDir": "./src",
|
|
"noEmit": false,
|
|
"incremental": false,
|
|
"skipLibCheck": true,
|
|
"skipDefaultLibCheck": true,
|
|
"esModuleInterop": true,
|
|
"resolveJsonModule": true,
|
|
"moduleResolution": "node",
|
|
"types": ["node", "react"]
|
|
},
|
|
"include": [
|
|
"src/db/index.ts",
|
|
"src/db/schema.ts",
|
|
"src/db/migrate.ts",
|
|
"src/lib/arcade/**/*.ts",
|
|
"src/app/games/matching/context/types.ts",
|
|
"src/app/games/matching/utils/cardGeneration.ts",
|
|
"src/app/games/matching/utils/matchValidation.ts",
|
|
"src/socket-server.ts"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
"**/*.test.ts",
|
|
"**/*.test.tsx",
|
|
"**/*.spec.ts"
|
|
]
|
|
}
|