File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import process from 'node:process'
22import { createHooks as create , type Hookable } from 'hookable'
33import { exec } from 'tinyexec'
44import treeKill from 'tree-kill'
5- import type { ResolvedConfig } from '../config/index.ts'
5+ import type { ResolvedConfig , TsdownChunks } from '../config/index.ts'
66import type { BuildOptions } from 'rolldown'
77
88export interface BuildContext {
@@ -33,7 +33,9 @@ export interface TsdownHooks {
3333 * Invoked after each tsdown build completes.
3434 * Use this hook for cleanup or post-processing tasks.
3535 */
36- 'build:done' : ( ctx : BuildContext ) => void | Promise < void >
36+ 'build:done' : (
37+ ctx : BuildContext & { chunks : TsdownChunks } ,
38+ ) => void | Promise < void >
3739}
3840
3941export async function createHooks ( options : ResolvedConfig ) : Promise < {
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ export async function buildSingle(
275275 await Promise . all ( [ writeExports ( config , chunks ) , copy ( config ) ] )
276276 // TODO: perf use one tarball for both attw and publint
277277 await Promise . all ( [ publint ( config ) , attw ( config ) ] )
278- await hooks . callHook ( 'build:done' , context )
278+ await hooks . callHook ( 'build:done' , { ... context , chunks } )
279279
280280 ab ?. abort ( )
281281 ab = executeOnSuccess ( config )
You can’t perform that action at this time.
0 commit comments