Registry / devops / yaup
library1.8.0jsnpmunverified

A minimal, unopinionated CLI wrapper around esbuild for building dual CJS/ESM packages with TypeScript declaration files. Current stable version is 1.8.0, maintained by egoist. It offers a simple config file (yaup.config.ts) with defineConfig, supporting multiple output formats (esm, cjs, dts). Unlike opinionated alternatives like tsup or rollup, yaup stays close to raw esbuild, giving users flexible configuration with minimal API surface. Release cadence is irregular; the author is not accepting new features unless critical.

npm install yaup
INSTALL
IMPORT
SIG · YAUP
Y
yaup
devopsjavascriptv1.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

defineConfig
import { defineConfig } from 'yaup'
const defineConfig = require('yaup').defineConfig
yaup is ESM-only, use import syntax
startDevServer
import { startDevServer } from 'yaup'
const startDevServer = require('yaup').startDevServer
Export for development server, available since v1.5.0
build
import { build } from 'yaup'
const yaup = require('yaup'); yaup.build()
build is a named export, not a method on default

Basic config to build dual CJS/ESM and Type declarations from a single entry

// yaup.config.ts import { defineConfig } from 'yaup' export default defineConfig({ input: './src/index.ts', output: [ { format: 'esm', dir: 'dist/esm' }, { format: 'cjs', dir: 'dist/cjs' }, { format: 'dts', dir: 'dist/types' }, ], })
yaup --version
Debug
Known issues
breakingDropped Node.js <12 support in v1.6.0
fix
Upgrade yaup to >=1.6.0 or use Node.js >=12
affects: <1.6.0
deprecatedformat: 'types' renamed to 'dts' in v1.3.0
fix
Use 'dts' instead of 'types' in output format
affects: >=1.3.0
gotchaConfig file must be named yaup.config.ts or yaup.config.js; other names are ignored
fix
Rename config file to yaup.config.ts or yaup.config.js
affects: >=1.0.0
gotchaThe input path must be relative to config file location, not cwd
fix
Use paths relative to the config file or absolute paths
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'esbuild'
esbuild is a peer dependency not installed automatically
fix
npm install esbuild --save-dev
Error: Config file not found: yaup.config.ts
Config file must be in the root of the project or specified with --config
fix
Place yaup.config.ts in project root or use `yaup --config /path/to/config`
TypeError: defineConfig is not a function
Using CommonJS require() instead of ESM import
fix
Change to `import { defineConfig } from 'yaup'` and ensure package.json has "type": "module"
Upgrade
Version history
1.8.0latest on npm
Audit
Dependencies
esbuildrequiredyaup wraps esbuild for bundling and/or TypeScript compilation
Agent activity
14 hits · last 30 days
node
12
Resources
yaup — npm install yaup · libregistry