🔧 fix: enhance watch mode to reload browser on build completion
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user