20 lines
447 B
TypeScript
20 lines
447 B
TypeScript
import { defineConfig } from 'tsdown'
|
|
import { peerDependencies } from './package.json' with { type: 'json' }
|
|
|
|
export default defineConfig((options) => {
|
|
const dev = !!options.watch
|
|
return {
|
|
entry: ['src/**/*.(ts|js)'],
|
|
format: ['esm'],
|
|
target: 'node24',
|
|
unbundle: true,
|
|
dts: true,
|
|
sourcemap: true,
|
|
clean: true,
|
|
splitting: false,
|
|
minify: !dev,
|
|
external: [...Object.keys(peerDependencies)],
|
|
tsconfig: 'tsconfig.json',
|
|
}
|
|
})
|