rebundle when main.js changes

This commit is contained in:
Rich Harris
2017-12-20 17:36:22 -05:00
parent fefb0d96d7
commit 4232f75b19

View File

@@ -71,6 +71,14 @@ function create_app() {
if (dev) {
route_manager.onchange(create_app);
const watcher = chokidar.watch(`templates/main.js`, {
ignoreInitial: true
});
watcher.on('add', create_app);
watcher.on('change', create_app);
watcher.on('unlink', create_app);
}
module.exports = create_app;