electron - 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?
解决方案
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.
推荐阅读
- django - 如何将某些页面的访问权限限制为 Django 中的管理员用户
- python-3.x - 机器人框架python无法打开浏览器
- modbus - PyModbus 无法读取保持寄存器
- python-3.x - 数学菜单循环返回
- java - 安装 jdk11 后无法打开 Eclipse
- php - 为什么 axios 不处理 'Content-Type': 'application/json'
- android - 丢失了我的密钥库密码和密钥密码。但是有pepk文件和jks文件,需要更新app
- r - 如何从 Excel 中提取 URL 并使用 R 将它们与其显示的文本匹配?
- php - POST AJAX 返回空数组,即使 console.log 也有值
- python - 2013, '在查询期间失去与 MySQL 服务器的连接'