diff --git a/scripts/watch.mjs b/scripts/watch.mjs index fe65433..8cd91b1 100644 --- a/scripts/watch.mjs +++ b/scripts/watch.mjs @@ -42,8 +42,16 @@ function watchMain(server) { electronProcess = null } - electronProcess = spawn(electron, ['.'], { stdio: 'inherit', env }) + electronProcess = spawn(electron, ['.'], { env }) electronProcess.on('exit', process.exit) + electronProcess.stdout.on('data', (data) => { + const str = data.toString().trim() + str && console.log(str) + }) + electronProcess.stderr.on('data', (data) => { + const str = data.toString().trim() + str && console.error(str) + }) }, }