A utility to find and parse tsconfig files without depending on typescript
Because no simple official api exists and tsconfig isn't actual json.
- find closest tsconfig (tsconfig.json or jsconfig.json)
- convert tsconfig to actual json and parse it
- resolve "extends"
- resolve "references" of solution-style tsconfig
- optional caching for improved performance
- optional findNative and parseNative to use official typescript api
- zero dependencies (typescript optional)
- extensive testsuite
- completely async and optimized (it's fast)
- tiny 4.7KB gzip
- unbundled esm js, no sourcemaps needed
- types generated with dts-buddy
Used by vite*, vite-tsconfig-paths, astro and many more
(*) vite bundles tsconfck so it is listed as a devDependency
npm install --save-dev tsconfck # or pnpm, yarn