Skip to main content

tsup

Usage

// tsup.config.ts
import { getConfig } from '@rtorcato/js-tooling/tsup'

export default getConfig({
entry: ['src/index.ts'],
}, process.env.NODE_ENV ?? 'development')

API

getConfig(customOptions, env)

Returns a tsup DefineConfig with opinionated defaults merged with your overrides.

OptionDefault
format['cjs', 'esm']
entrysrc/**/*.ts
dtstrue
cleantrue
splittingtrue
treeshaketrue
skipNodeModulesBundletrue
minifyproduction only
bundlefalse

baseOptions(options, env)

Lower-level helper that returns the raw Options object. Use getConfig unless you need direct access.