diff --git a/src/index.ts b/src/index.ts index f2f1b1b6..f5c1e494 100644 --- a/src/index.ts +++ b/src/index.ts @@ -323,7 +323,13 @@ export async function build(_options: Options) { // By default we only rebuild when imported files change // If you specify custom `watch`, a string or multiple strings // We rebuild when those files change - if (options.watch === true && !buildDependencies.has(file)) { + if (options.watch === true && !buildDependencies.has(file) && ![ + 'tsup.config.ts', + 'tsup.config.js', + 'tsup.config.cjs', + 'tsup.config.mjs', + 'tsup.config.json' + ].includes(file)) { return } logger.info('CLI', `Change detected: ${type} ${file}`)