Under version 8.5.0, when using the observer mode of tsup, the dts file is only generated in the output folder for the first time. Subsequent code updates will not update the dts file in the output folder.
Here is my configuration
tsup.config.ts:
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/*'],
dts: true,
splitting: false,
sourcemap: false,
minify: true,
clean: true,
format: ['esm'],
outDir: 'es',
outExtension() {
return { js: '.js' }; x
},
})
package.json:
"scripts": {
"dev": "tsup --watch",
"build": "tsup"
},