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.jsonLibrary packages
nextjs.jsonbase.jsonNext.js apps (app, web, api)
react-library.jsonbase.jsonReact component packages (design-system)
convex.jsonConvex backend (packages/backend/convex/)

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 across the monorepo after modifying it.

Learn More