diff --git a/package.json b/package.json index 28d790b..25c3d18 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,12 @@ "scripts": { "dev": "nodemon", "start": "NODE_ENV=production ts-node src/server/main.ts", - "build": "vite build && pnpm build:tracker && pnpm build:geo", + "build": "pnpm build:client && pnpm build:server && pnpm build:tracker && pnpm build:geo", + "build:client": "vite build", + "build:server": "tsc -p tsconfig.server.json", "build:tracker": "ts-node scripts/build-tracker.ts", "build:geo": "ts-node scripts/build-geo.ts", - "check:type": "tsc --noEmit --skipLibCheck --jsx react-jsx --module esnext", + "check:type": "tsc --noEmit --skipLibCheck --module esnext", "db:push": "prisma db push", "db:generate": "prisma generate", "db:studio": "prisma studio" diff --git a/tsconfig.json b/tsconfig.json index 91ff255..df8ed05 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,7 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx" }, "include": ["src", "types"] } diff --git a/tsconfig.server.json b/tsconfig.server.json new file mode 100644 index 0000000..0c683b5 --- /dev/null +++ b/tsconfig.server.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "include": ["./src/server/**/*.ts", "./src/shared/**/*.ts", "./src/types/**/*.ts"], + "exclude": ["node_modules/**/*", "dist"], + "compilerOptions": { + "rootDirs": ["./", "../"], + "outDir": "./dist", + "noEmit": false + } +}