Skip to content

Commit

Permalink
feat: add tsup.confg.* file support in watch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lvqq committed Sep 11, 2022
1 parent d074dd9 commit 25d1565
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.ts
Expand Up @@ -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}`)
Expand Down

0 comments on commit 25d1565

Please sign in to comment.