mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
Merge pull request #129 from lzdyes/main
fix: print Chinese characters are garbled in Windows terminal
This commit is contained in:
commit
0ba40c4c86
@ -42,8 +42,17 @@ function watchMain(server) {
|
||||
electronProcess = null
|
||||
}
|
||||
|
||||
electronProcess = spawn(electron, ['.'], { stdio: 'inherit', env })
|
||||
electronProcess = spawn(electron, ['.'], { env })
|
||||
electronProcess.on('exit', process.exit)
|
||||
// https://github.com/electron-vite/electron-vite-vue/pull/129
|
||||
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