mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
fix: print Chinese characters are garbled in Windows terminal
This commit is contained in:
parent
ee60a719f6
commit
75b5e3754e
@ -42,8 +42,16 @@ function watchMain(server) {
|
|||||||
electronProcess = null
|
electronProcess = null
|
||||||
}
|
}
|
||||||
|
|
||||||
electronProcess = spawn(electron, ['.'], { stdio: 'inherit', env })
|
electronProcess = spawn(electron, ['.'], { env })
|
||||||
electronProcess.on('exit', process.exit)
|
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)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user