Skip to main content
@repo/typescript-config provides base TypeScript configurations that all apps and packages extend. It keeps compiler settings consistent across the monorepo.

Presets

ConfigExtendsUsed by
base.jsonn/aLibrary packages
nextjs.jsonbase.jsonNext.js apps (app, web, api)
react-library.jsonbase.jsonReact component packages (design-system)
convex.jsonn/aConvex backend (packages/backend/convex/)
electron.jsonbase.jsonElectron main process and preload scripts (apps/desktop)
electron-renderer.jsonbase.jsonElectron renderer with Vite + React (apps/desktop)
expo.jsonn/aExpo mobile app (apps/mobile)

Usage

Extend a preset in your package’s tsconfig.json:
apps/app/tsconfig.json
{
  "extends": "@repo/typescript-config/nextjs.json",
  "compilerOptions": {
    "outDir": "dist"
  },
  "include": ["**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules"]
}
For library packages:
packages/auth/tsconfig.json
{
  "extends": "@repo/typescript-config/base.json",
  "compilerOptions": {
    "outDir": "dist"
  },
  "include": ["**/*.ts"],
  "exclude": ["node_modules"]
}
For Convex functions:
packages/backend/convex/tsconfig.json
{
  "extends": "@repo/typescript-config/convex.json",
  "include": ["./**/*"],
  "exclude": ["./_generated"]
}

Key Settings

All presets enable strict mode and strictNullChecks. The base config targets ES2022 with NodeNext module resolution. The Next.js preset switches to Bundler resolution and adds the next plugin. Changes to packages/typescript-config/ affect every app and package. Run bun run typecheck in the affected apps and packages after modifying it.

Learn More