From f2cc7cfee7a1f164065c03390722699f8df4a686 Mon Sep 17 00:00:00 2001 From: fatme Date: Mon, 17 Sep 2018 10:33:09 +0300 Subject: [PATCH] chore: stop webpack compiler when ctrl+c is pressed while executing `tns preview --bundle` command --- lib/before-watch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/before-watch.js b/lib/before-watch.js index 94bbf90c..828819d5 100644 --- a/lib/before-watch.js +++ b/lib/before-watch.js @@ -12,6 +12,10 @@ module.exports = function ($logger, $liveSyncService, $options, $devicesService, stopWebpackCompiler(platform); } }); + + process.on("exit", () => { + stopWebpackCompiler(); + }); }); const platforms = hookArgs.config.platforms;