bunchee

Zero-config bundler for JS/TS packages — use your package.json as the config.
➜~/project$npm install --save-dev bunchee typescript
➜~/project$cat package.json
{
  "name": "coffee",
  "type": "module",
  "main": "./dist/index.js",
  "scripts": { "build": "bunchee" }
}
➜~/project$npm run build
Exports  File             Size
.        dist/index.js    5.6 kB
# Features
- Zero config, smart externals, and TS declarations
- Works great for monorepos
# Learn
## Entry & Convention
Files in src/ folder match export names in package.json:
+--------------------------+---------------------+
| File                     | Export Name         |
+--------------------------+---------------------+
| src/index.ts             | "." (default)       |
| src/lite.ts              | "./lite"            |
| src/react/index.ts       | "./react"           |
+--------------------------+---------------------+
## Directives
Bunchee can manage multiple directives such as "use client", "use server", or "use cache" and automatically split your code into different chunks and preserve the directives properly.