Deluze / electron-vue-template

Simple Vue3 + Electron starter template in TypeScript, including ViteJS and Electron Builder
MIT License
579 stars 108 forks source link

Hot-reload will stop making multiple windows #16

Closed immafrady closed 2 years ago

immafrady commented 2 years ago

During the process of electron hot-reload, I edit the electron side's file, will open multiple windows, that's annoying.

(sorry for my bad grammar)

Deluze commented 2 years ago

What do you mean with multiple windows? After a change of the main process code it should kill the Electron process. Can you show an example / steps to reproduce?

immafrady commented 2 years ago

What do you mean with multiple windows? After a change of the main process code it should kill the Electron process. Can you show an example / steps to reproduce?

https://youtu.be/Mfks04jhh-4

I record a video of my actions

Deluze commented 2 years ago

It took me a while to understand, but I now see the problem, thanks for your PR.

You forgot to unlock the process lock when the TypeScript compilation fails. If you unlock the process during the catch everything looks good and I'll merge your PR.

immafrady commented 2 years ago

It took me a while to understand, but I now see the problem, thanks for your PR.

You forgot to unlock the process lock when the TypeScript compilation fails. If you unlock the process during the catch everything looks good and I'll merge your PR.

Ok ^^