Skip to content

perf(build): limit strict production TypeScript checks to shipped code - #91

Merged
yotamon merged 4 commits into
mainfrom
chore/production-typecheck-scope-20261016
Oct 16, 2026
Merged

yotamon merged 4 commits into
mainfrom
chore/production-typecheck-scope-20261016

Conversation

@yotamon

@yotamon yotamon commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Production Vercel build logs show ~58 seconds spent in TypeScript checking. The root tsconfig selects 946 tracked TS/TSX files, including 147 test files and development-only scripts that don't ship in the Next.js app.

Changes

  • Add tsconfig.build.json extending the existing strict tsconfig.json, excluding tests, development scripts, Firebase Functions (which have their own TypeScript compilation CI), and lint tooling.
  • Give production-only type checking a separate incremental .tsbuildinfo cache to avoid collisions with local dev diagnostics.
  • Configure Next.js to use the scoped config for NODE_ENV=production while preserving the full root config in development, with ignoreBuildErrors: false.
  • Add regression tests checking the strict type-check gate and included/excluded paths.

Safety and verification

  • No disabling of TypeScript checking. No runtime routing, static page generation, SEO or deployment settings changed.
  • Existing GitHub CI should execute focused tests. Monitor next automatic production build for time reduction (no preview deployment requested).
  • Full repository typechecking remains available with the existing pnpm lint / pnpm typecheck scripts.

Scope

No Vercel preview or manual release.

@yotamon
yotamon merged commit c0b8b0a into main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant