fix(windows): address native CI review findings

This commit is contained in:
Tianyi Cui
2026-08-09 13:57:50 +08:00
parent eb9e7c19eb
commit 3b5ee1dce1
10 changed files with 41 additions and 21 deletions

View File

@@ -242,12 +242,13 @@ class Hmr extends Service {
const onChange = (kind: 'add' | 'change' | 'unlink', path: string) => {
this.ctx.logger.debug('%s detected at %C', kind, path)
const filename = resolve(this.baseDir, path)
const filename = resolve(watchBaseDir, path)
const configuredFilename = resolve(this.baseDir, path)
// Config reload: the file is a loader config file (e.g. cordis.yml).
for (const entry of loader.entries()) {
const include = entry.subtree as Include | undefined
if (include?.filename !== filename) continue
this.refreshConfig(include, filename, () => include.refresh())
if (include?.filename !== filename && include?.filename !== configuredFilename) continue
this.refreshConfig(include, include.filename, () => include.refresh())
return
}