fix(build): exclude __tests__ + .test.{ts,tsx} from prod tsc
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled

Production build was failing because tsc compiled src/**/__tests__/*.test.tsx files
which reference vitest globals (test/expect/beforeEach) and react-router-dom — neither
imported nor in production deps. Resulted in 8 TS errors at `pnpm build` step inside
Coolify's Docker stage, blocking dev.sase.tr deploys since 2026-05-11 09:12.

Tests still run via vitest (its include pattern is unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
semih
2026-05-11 14:42:19 +00:00
parent 53a0dfab7d
commit 8b26a2c4e6
13 changed files with 79 additions and 1 deletions

View File

@@ -18,5 +18,5 @@
}
},
"include": ["src", "vite-env.d.ts"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist", "**/__tests__/**", "**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"]
}