From 4232f75b19d8f46b444c8481ba0e6f9b5343f728 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 20 Dec 2017 17:36:22 -0500 Subject: [PATCH] rebundle when main.js changes --- lib/utils/create_app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/utils/create_app.js b/lib/utils/create_app.js index df5b7d3..ca1df29 100644 --- a/lib/utils/create_app.js +++ b/lib/utils/create_app.js @@ -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; \ No newline at end of file