Skip to content

Commit

Permalink
fix(cli): watch for config source changes to reload config (#3640)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukpank committed Mar 26, 2024
1 parent 13faa7a commit 4d1442b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export async function build(_options: CliOptions) {

if (configSources.includes(absolutePath)) {
await ctx.reloadConfig()
if (configSources.length)
watcher.add(configSources)
consola.info(`${cyan(basename(file))} changed, setting new config`)
}
else {
Expand Down

0 comments on commit 4d1442b

Please sign in to comment.