Skip to content

Commit a902f45

Browse files
committed
fix: properly allow for rootDir overriding
1 parent 44e0a22 commit a902f45

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

build.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const result = await Bun.build({
1111

1212
plugins: [
1313
dts({
14+
rootDir: `${import.meta.dir}/src`,
1415
cwd: import.meta.dir,
1516
}),
1617
],

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function generate(entryPoints: string | string[], options?: DtsOpti
2727
const configJson = ts.readConfigFile(path, ts.sys.readFile).config
2828

2929
const opts: TsOptions = {
30-
rootDir: options?.cwd ?? process.cwd(),
30+
rootDir: options?.rootDir ?? options?.cwd ?? process.cwd(),
3131
declaration: true,
3232
emitDeclarationOnly: true,
3333
noEmit: false,

0 commit comments

Comments
 (0)