Skip to content

Commit f3a34c7

Browse files
committed
fix(output): clear console on first start with --clear flag
1 parent 1cb014d commit f3a34c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export const runDev = (
103103
*/
104104
let compileReqWatcher: chokidar.FSWatcher
105105
function start() {
106+
if (cfg.clear) process.stdout.write('\u001bc')
106107
for (const watched of (opts.watch || '').split(',')) {
107108
if (watched) watcher.add(watched)
108109
}
@@ -220,9 +221,7 @@ export const runDev = (
220221
compiler.init()
221222
}
222223
compiler.clearErrorCompile()
223-
224-
//if (cfg.clear) process.stdout.write("\u001b[2J\u001b[0;0H")
225-
if (cfg.clear) process.stdout.write('\u001bc')
224+
226225
if (isManualRestart === true) {
227226
notify('Restarting', 'manual restart from user')
228227
} else {

0 commit comments

Comments
 (0)