mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
perf(build): enable incremental tsc (#827)
backend/tsconfig.json had no incremental setting, so every tsc run re-checked the full project from cold. The two frontend tsconfigs already declared a tsBuildInfoFile path under node_modules/.tmp/ but without incremental: true the file was never written, and the path itself sits inside node_modules where npm ci wipes it on every fresh install — neither of which actually persists incremental state. Add incremental: true to all three configs and drop the broken tsBuildInfoFile overrides. TypeScript's default places the buildinfo next to the tsconfig (e.g. backend/tsconfig.tsbuildinfo); the root .gitignore already covers *.tsbuildinfo so nothing leaks into git. Local cold-vs-warm tsc --noEmit on the backend dropped from ~3.0s to ~1.4s — ~2x speedup on the warm path. CI builds are still cold because runners do not cache the buildinfo between jobs; that is a separate workflow change.
This commit is contained in:
@@ -9,7 +9,8 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"incremental": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"exclude": ["node_modules", "dist"]
|
"exclude": ["node_modules", "dist"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"incremental": true,
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
"incremental": true,
|
||||||
"target": "ES2023",
|
"target": "ES2023",
|
||||||
"lib": ["ES2023"],
|
"lib": ["ES2023"],
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
|
|||||||
Reference in New Issue
Block a user