#Bun build TS no exported member errors

1 messages · Page 1 of 1 (latest)

hidden heath
#

Using Bun build (it's awesome!) to bundle a UI library, migrating from a working tsup setup. Everything functionally works (build + downstream usage), but tsc declaration files don't resolve the source paths properly, causing module resolution failures in downstream app.

Repro:

Working tsup config that can be triggered with bunx tsup: https://github.com/omnidotdev/sigil/blob/feature/bun-build/tsup.config.ts

I'm sure I'm missing something obvious. Figured there is likely an issue with my build script or build tsconfig (https://github.com/omnidotdev/sigil/blob/feature/bun-build/tsconfig.build.json)

hidden heath
#

I did get this working by using tsup to still build the declaration files, i.e.

await $`bun tsup --dts-only`;

Not ideal though, but nice workaround for now