From f1e497917d3af8d51354cf2fb3903230f60d6017 Mon Sep 17 00:00:00 2001 From: "Jan T. Sott" Date: Sun, 28 Apr 2024 09:13:01 +0200 Subject: [PATCH] update tsup config --- tsup.config.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tsup.config.ts b/tsup.config.ts index 4ff2001..ba22a2f 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,11 +1,13 @@ import { defineConfig } from 'tsup'; -export default defineConfig({ - target: 'esnext', - clean: true, - dts: true, - entry: ['src/index.ts'], - format: 'esm', - minify: true, - treeshake: 'recommended' +export default defineConfig((options) => { + return { + target: 'esnext', + clean: true, + dts: !options.watch, + entry: ['src/index.ts'], + format: 'esm', + minify: !options.watch, + treeshake: 'recommended' + } });