mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-11 19:04:30 +00:00
Reload only when live reload is enabled
This commit is contained in:
@@ -206,15 +206,19 @@ class Watcher extends EventEmitter {
|
||||
});
|
||||
}
|
||||
}
|
||||
),
|
||||
|
||||
fs.watch(`${src}/template.html`, () => {
|
||||
this.dev_server.send({
|
||||
action: 'reload'
|
||||
});
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
if (this.live) {
|
||||
this.filewatchers.push(
|
||||
fs.watch(`${src}/template.html`, () => {
|
||||
this.dev_server.send({
|
||||
action: 'reload'
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
let deferred = new Deferred();
|
||||
|
||||
// TODO watch the configs themselves?
|
||||
@@ -252,7 +256,7 @@ class Watcher extends EventEmitter {
|
||||
this.dev_server.send({
|
||||
status: 'completed'
|
||||
});
|
||||
} else {
|
||||
} else if (this.live) {
|
||||
this.dev_server.send({
|
||||
action: 'reload'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user