Skip to content

Interface: Options

Defined in: options.ts:38

Options for tsdown.

Properties

alias?

optional alias: Record<string, string>

Defined in: options.ts:48


clean?

optional clean: boolean | string[]

Defined in: options.ts:66


config?

optional config: string | boolean

Defined in: options.ts:102

Config file path


define?

optional define: Record<string, string>

Defined in: options.ts:70


dts?

optional dts: boolean | Options

Defined in: options.ts:125

Emit declaration files


entry?

optional entry: InputOption

Defined in: options.ts:40


external?

optional external: ExternalOption

Defined in: options.ts:41


fixedExtension?

optional fixedExtension: boolean

Defined in: options.ts:80

Use a fixed extension for output files. The extension will always be .cjs or .mjs. Otherwise, it will depend on the package type.

Default

ts
false

format?

optional format: ModuleFormat | ModuleFormat[]

Defined in: options.ts:61

Default

ts
'es'

fromVite?

optional fromVite: boolean | "vitest"

Defined in: options.ts:119

Reuse config from Vite or Vitest (experimental)

Default

ts
false

globalName?

optional globalName: string

Defined in: options.ts:62


inputOptions?

optional inputOptions: InputOptions | (options, format) => Awaitable<null | void | InputOptions>

Defined in: options.ts:52


minify?

optional minify: boolean

Defined in: options.ts:68

Default

ts
false

noExternal?

optional noExternal: Arrayable<string | RegExp> | (id, importer) => undefined | null | boolean | void

Defined in: options.ts:42


onSuccess?

optional onSuccess: string | (config) => void | Promise<void>

Defined in: options.ts:108

You can specify command to be executed after a successful build, specially useful for Watch mode


outDir?

optional outDir: string

Defined in: options.ts:64

Default

ts
'dist'

outExtensions?

optional outExtensions: OutExtensionFactory

Defined in: options.ts:85

Custom extensions for output files. fixedExtension will be overridden by this option.


outputOptions?

optional outputOptions: OutputOptions | (options, format) => Awaitable<null | void | OutputOptions>

Defined in: options.ts:87


platform?

optional platform: "node" | "neutral" | "browser"

Defined in: options.ts:51

Default

ts
'node'

plugins?

optional plugins: RolldownPluginOption

Defined in: options.ts:96


publint?

optional publint: boolean | Options

Defined in: options.ts:137

Run publint after bundling. Requires publint to be installed.


shims?

optional shims: boolean

Defined in: options.ts:72

Default

ts
false

silent?

optional silent: boolean

Defined in: options.ts:98


skipNodeModulesBundle?

optional skipNodeModulesBundle: boolean

Defined in: options.ts:113

Skip bundling node_modules.


sourcemap?

optional sourcemap: Sourcemap

Defined in: options.ts:65


target?

optional target: string | string[]

Defined in: options.ts:69


treeshake?

optional treeshake: boolean

Defined in: options.ts:95

Default

ts
true

tsconfig?

optional tsconfig: string | boolean

Defined in: options.ts:49


unused?

optional unused: boolean | Options

Defined in: options.ts:131

Enable unused dependencies check with unplugin-unused Requires unplugin-unused to be installed.


watch?

optional watch: string | boolean | string[]

Defined in: options.ts:103

Released under the MIT License.