Package Exports
- bun-plugin-dts
- bun-plugin-dts/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bun-plugin-dts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bun-plugin-dts
A Bun plugin for generating .d.ts files.
Install
bun install bun-plugin-dtsUsage
import dts from 'bun-plugin-dts'
await Bun.build({
entrypoints: ['./src/index.ts'],
outdir: './dist',
plugins: [
dts()
],
})If you have multiple entrypoints, it's required to specify a preferred tsconfig file:
await Bun.build({
entrypoints: ['./src/index.ts', './src/other.ts'],
outdir: './dist',
plugins: [
dts({
compilationOptions: {
preferredConfigPath: './tsconfig.json'
}
})
],
})This plugin utilizes dts-bundle-generator internally, allowing you to easily customize its behavior by passing specific options for dts-bundle-generator.
License
MIT