JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8269
  • Score
    100M100P100Q129889F
  • License MIT

A bun plugin for generating dts files

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-dts

Usage

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