Skip to content

Interface: TsdownHooks ​

Defined in: src/features/hooks.ts:20

Hooks for tsdown.

Properties ​

build:before ​

ts
build:before: (ctx) => void | Promise<void>;

Defined in: src/features/hooks.ts:31

Invoked before each Rolldown build. For dual-format builds, this hook is called for each format. Useful for configuring or modifying the build context before bundling.

Parameters ​

ctx ​

BuildContext & RolldownContext

Returns ​

void | Promise<void>


build:done ​

ts
build:done: (ctx) => void | Promise<void>;

Defined in: src/features/hooks.ts:36

Invoked after each tsdown build completes. Use this hook for cleanup or post-processing tasks.

Parameters ​

ctx ​

BuildContext & object

Returns ​

void | Promise<void>


build:prepare ​

ts
build:prepare: (ctx) => void | Promise<void>;

Defined in: src/features/hooks.ts:25

Invoked before each tsdown build starts. Use this hook to perform setup or preparation tasks.

Parameters ​

ctx ​

BuildContext

Returns ​

void | Promise<void>

Released under the MIT License.