English | 简体中文
⚡️ Zero-config ESM/TS package builder. Powered by Oxc, Rolldown and rolldown-plugin-dts.
- ⚡ Fast: Built on top of rolldown and oxc
- 📦 Zero config: Works out of the box, configurable when needed
- 🎯 TypeScript: First-class TypeScript support with
.d.tsgeneration - 🔄 Dual mode: Bundle or transform your source code
- 🚀 Stub mode: Lightning-fast development with file linking
- 📤 Exports: Automatic package.json exports generation
npm install robuild
# or
pnpm add robuild
# or
yarn add robuild# Bundle your library
npx robuild ./src/index.ts
# Transform source files
npx robuild ./src/runtime/:./dist/runtime
# Watch mode for development
npx robuild ./src/index.ts --watch# Bundle your library
npx robuild ./src/index.ts
# Transform source files
npx robuild ./src/runtime/:./dist/runtime
# Watch mode for development
npx robuild ./src/index.ts --watchCreate build.config.ts in your project root:
import { defineConfig } from 'robuild'
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm', 'cjs'],
},
{
type: 'transform',
input: './src/runtime',
outDir: './dist/runtime',
},
],
})Visit our documentation site for detailed guides, API reference, and examples.
| File | Stmts | Branch | Funcs | Lines |
|---|---|---|---|---|
| All files | 86.44% | 80.12% | 92.94% | 86.32% |
| src/build.ts | 84.15% | 67.74% | 100.00% | 83.54% |
| src/builders | 89.89% | 82.80% | 96.43% | 89.89% |
| src/config | 85.38% | 67.96% | 100.00% | 84.92% |
| src/core | 74.19% | 57.14% | 68.42% | 74.19% |
| src/plugins | 97.50% | 95.37% | 97.37% | 97.46% |
| src/plugins/builtin | 88.15% | 84.92% | 95.59% | 88.12% |
| src/plugins/extras | 96.55% | 100.00% | 100.00% | 96.30% |
| src/transforms | 71.43% | 63.77% | 81.82% | 71.27% |
| src/utils | 88.29% | 85.44% | 100.00% | 88.29% |
| src/watch.ts | 81.48% | 81.82% | 57.14% | 81.48% |
Run coverage locally:
pnpm test:coverage