npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zemd/tsconfig

v2.0.0

Published

Shared default tsconfig for my projects

Readme

@zemd/tsconfig

npm

Shared TypeScript configs with strict defaults for React libraries, Next.js apps, and Node.js projects.

Configs

| Config | Target | Module | Key features | | --------------------- | ------ | ------------------ | ------------------------ | | tsconfig-react.json | ESNext | ESNext (Bundler) | JSX, DOM types | | tsconfig-next.json | ESNext | Preserve (Bundler) | Next.js plugin, noEmit | | tsconfig-node.json | ES2025 | NodeNext | Node.js types |

All configs extend tsconfig-base.json which enables strict mode, verbatimModuleSyntax, isolatedDeclarations, erasableSyntaxOnly, and other strict checks.

Install

npm install @zemd/tsconfig --save-dev

Usage

React library

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@zemd/tsconfig/tsconfig-react.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*.ts", "src/**/*.tsx"],
  "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
}

Next.js app

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@zemd/tsconfig/tsconfig-next.json",
  "include": ["next-env.d.ts", "src/**/*.ts", "src/**/*.tsx"],
  "exclude": ["node_modules", ".next"]
}

Node.js project

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@zemd/tsconfig/tsconfig-node.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules", "dist", "**/*.test.ts"]
}

Monorepo

In a monorepo, use a solution-style root tsconfig.json that references each package. Each package then extends the appropriate config and enables composite for project references.

Root tsconfig.json — does not compile anything, only wires packages together:

{
  "files": [],
  "references": [
    { "path": "packages/ui" },
    { "path": "packages/utils" },
    { "path": "packages/web" }
  ]
}

packages/ui/tsconfig.json — a React component library:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@zemd/tsconfig/tsconfig-react.json",
  "compilerOptions": {
    "composite": true,
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*.ts", "src/**/*.tsx"],
  "exclude": ["node_modules", "dist"],
  "references": [
    { "path": "../utils" }
  ]
}

packages/utils/tsconfig.json — a shared Node.js utility package:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@zemd/tsconfig/tsconfig-node.json",
  "compilerOptions": {
    "composite": true,
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules", "dist"]
}

Then build the entire project graph with:

tsc --build

Tip: The base config already enables declaration, declarationMap, and isolatedDeclarations — which means fast, parallelizable declaration emit and full cross-package IDE navigation out of the box.

Compatibility

These configs target the latest LTS Node.js (currently Node.js 24) and are designed for TypeScript 6.0+, with the latest versions of React and Next.js in mind. If you're on an older Node.js or TypeScript version, you may need to adjust target, module, or lib settings in your own tsconfig.json.

Notes

  • You must set outDir and rootDir yourself - TypeScript treats these as relative paths, so they should live in your own tsconfig.json.
  • When extending tsconfig-next.json, make sure next-env.d.ts is in the include array (it is by default). If you override include, add it back manually.
  • The base config includes watchOptions that uses useFsEventsOnParentDirectory and excludes **/node_modules, dist, and tmp directories. To extend or override, add your own watchOptions in your tsconfig.json:
    {
      "watchOptions": {
        "excludeDirectories": ["**/node_modules", "dist", "tmp", ".next"]
      }
    }

License

@zemd/tsconfig is released under the MIT license.

Donate