To create a bundle I run this command in CLI:
bun build ./index.ts --outdir ./build
The tsconfig.json contains this configuration:
{
"compilerOptions": {
"declaration": true,
},
}
A single bundled file .build/index.js will be created.
Which is good.
In addition I would like to have all type definitions that are used bundled in a single .d.ts file.
How do I get this file?
Bun can't build type definitions.
So, the only alternative is to run
tsc --emitDeclarationOnlyfor generating type definitions.