首页 > 解决方案 > electron main process hot reload or live reload

问题描述

It's easy to make a hot reload for webpage in electron BrowserWindow, But what about the main process? every time I change some event handler code in the main process, I need to restart electron to make the code take effect, any method to solve this problem without restarting the electron process?

标签: electron

解决方案


There is not. Electron's main process is node.js, which doesn't support reload modules from its cache out of the box. Unless node.js have support for it, Electron will inherit same behavior.


推荐阅读