From 25d15657aceacce2c8bf5458f1048cbce5d8c8ea Mon Sep 17 00:00:00 2001 From: lvqq Date: Sun, 11 Sep 2022 16:07:34 +0800 Subject: [PATCH] feat: add tsup.confg.* file support in watch mode --- src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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}`)