dc93cf4c59
## Summary - Add `@typescript/native-preview` (tsgo) for dramatically faster type checking on frontend projects - Configure tsgo as default for frontend projects (twenty-front, twenty-ui, twenty-shared, etc.) - Keep tsc for twenty-server (faster for NestJS decorator-heavy code) - Fix type imports for tsgo compatibility (DOMPurify, AxiosInstance) - Remove deprecated `baseUrl` from tsconfigs where safe ## Performance Results | Project | tsgo | tsc -b | Speedup | |---------|------|--------|---------| | **twenty-front** | 1.4s | 60.7s | **43x faster** | | **twenty-server** | 2m42s | 1m10s | tsc is faster (decorators) | tsgo excels at modern React/JSX codebases but struggles with decorator-heavy NestJS backends, so we use the optimal checker for each. ## Usage ```bash # Default (tsgo for frontend, tsc for backend) nx typecheck twenty-front nx typecheck twenty-server # Force tsc fallback if needed nx typecheck twenty-front --configuration=tsc # Force tsgo on backend (slower, not recommended) nx typecheck twenty-server --configuration=tsgo ``` ## Test plan - [x] `nx typecheck twenty-front` passes with tsgo - [x] `nx typecheck twenty-server` passes with tsc - [x] `nx run-many -t typecheck --exclude=fireflies` passes - [ ] CI tests pass
24 lines
453 B
JSON
24 lines
453 B
JSON
{
|
|
"type": "module",
|
|
"compilerOptions": {
|
|
"jsx": "react-jsx",
|
|
"allowJs": false,
|
|
"esModuleInterop": false,
|
|
"allowSyntheticDefaultImports": true,
|
|
"strict": true,
|
|
"types": ["vite/client"],
|
|
"paths": {
|
|
"@/*": ["./src/*"],
|
|
"src/*": ["./src/*"]
|
|
}
|
|
},
|
|
"files": [],
|
|
"include": ["vite.config.ts"],
|
|
"references": [
|
|
{
|
|
"path": "./tsconfig.lib.json"
|
|
}
|
|
],
|
|
"extends": "../../tsconfig.base.json"
|
|
}
|