tsdown.config.ts 603 B

123456789101112131415161718
  1. import { defineConfig } from 'tsdown'
  2. /**
  3. * The packer ships TWO entries: the library (`index`) and the `dsh-pack-vfs-image`
  4. * CLI (`bin`), the latter referenced by package.json `bin`. The root tsdown
  5. * builds only `lib/types/index.js`, so this override adds `lib/types/bin.js`.
  6. * Declarations come from `tsc -b` (dts: false), matching every package.
  7. */
  8. export default defineConfig({
  9. entry: ['lib/types/index.js', 'lib/types/bin.js', 'lib/types/invariant.js'],
  10. outDir: 'lib',
  11. format: ['esm'],
  12. platform: 'node',
  13. target: 'es2024',
  14. fixedExtension: false,
  15. dts: false,
  16. clean: false,
  17. })