zshy is a modern build tool aimed at TypeScript library authors who want a bundler-free development experience. Instead of relying on bundlers like Webpack or tsup, zshy leverages the TypeScript compiler (tsc) itself to produce both ESM and CommonJS builds, generate type declarations, and automatically populate "exports" fields in a package’s package.json. It reads configuration directly from package.json and standard TypeScript config files, doesn’t require its own config, and supports multi-entry libraries with deep wildcard exports. Originally created for building popular libraries such as Zod, zshy fills the niche for a straightforward, convention-over-configuration build pipeline for TypeScript packages. The tool copies non-JS assets, supports .tsx, and makes CLI packaging easy, helping maintain consistent library outputs with minimal boilerplate.
Features
- Bundler-free TypeScript build pipeline
- Dual ESM + CommonJS output
- Auto-generated exports map in package.json
- Reads from standard TS config (no extra config)
- Supports assets and .tsx handling
- Ideal for library authors