run webpack in watch mode

This commit is contained in:
Rich Harris
2017-12-16 16:24:36 -05:00
parent bd7f6e2b1a
commit 71ed3864b7
2 changed files with 93 additions and 56 deletions

View File

@@ -23,4 +23,8 @@ module.exports = function create_app(src, dest, routes, options) {
const main = template.replace('__routes__', code);
fs.writeFileSync(main_built, main);
// need to fudge the mtime, because webpack is soft in the head
const stats = fs.statSync(main_built);
fs.utimesSync(main_built, stats.atimeMs - 9999, stats.mtimeMs - 9999);
};