import { defineConfig } from 'tsup'

export default defineConfig({
  bundle: true,
  clean: false,
  dts: { entry: ['src/index.ts'] },
  outExtension: ({ format }) => ({ js: format === 'cjs' ? '.cjs' : '.mjs' }),
  entry: ['src'],
  format: ['esm'],
  outDir: 'dist',
  sourcemap: true,
  splitting: false,
  target: 'esnext',
  tsconfig: 'tsconfig.build.json',
})
