🔧 fix: enhance watch mode to reload browser on build completion

This commit is contained in:
2026-02-27 13:29:44 +00:00
parent 2170bf761e
commit d1ef9800f1
2 changed files with 180 additions and 1 deletions

View File

@@ -56,7 +56,11 @@ switch (process.argv?.length > 2 ? process.argv[2] : "build") {
bs.init(config.browserSync)
case "watch":
// config.options.incremental = true
build(true)
build(true).then(() => {
if (bs) {
bs.reload()
}
})
const watcher = watch(config.watch.path)
log("watching files...")
watcher.on("change", function (path) {