Skip to content

Commit 5bae612

Browse files
committed
feat: use default build outdir unless option provided
1 parent a141dcf commit 5bae612

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ console.log('Building...')
66

77
const result = await Bun.build({
88
entrypoints: ['src/index.ts'],
9-
outdir: './dist',
9+
outdir: 'dist',
1010
target: 'bun',
1111

1212
plugins: [
1313
dts({
1414
cwd: import.meta.dir,
15-
outdir: 'dist',
1615
}),
1716
],
1817
})

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ export function dts(options?: DtsOptions): BunPlugin {
5959

6060
async setup(build) {
6161
const entrypoints = [...build.config.entrypoints].sort()
62-
await generate(entrypoints, options)
62+
63+
await generate(entrypoints, {
64+
outdir: build.config.outdir,
65+
...options,
66+
})
6367
},
6468
}
6569
}

0 commit comments

Comments
 (0)