惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

孙琪峥

端午安康!博客进行了主题升级 - 孙琪峥 群晖NAS MySQL无法外部连接的解决办法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 群晖NAS MySQL无法外部连接的解决办法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 “npm warn Unknown project config "electron_mirror". This will stop working in the next major version of npm”的解决方案 - 孙琪峥 “npm warn Unknown project config "electron_mirror". This will stop working in the next major version of npm”的解决方案 - 孙琪峥 鱼贝贝文件信息批量提取神器v1.3.0.250118 免费|绿色免安装|全功能离线版 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 鱼贝贝文件信息批量提取神器v1.3.0.250118 免费|绿色免安装|全功能离线版 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 phpstudy启动报错nginx: [emerg] invalid number of arguments in "include" directive in 的解决方法 - 孙琪峥 phpstudy启动报错nginx: [emerg] invalid number of arguments in "include" directive in 的解决方法 - 孙琪峥 微信小程序《隐私政策》范文参考 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 微信小程序《隐私政策》范文参考 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发中使用nodemon进行热更新的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发,文件无法拖放到渲染窗口的一种奇怪情况,附原因和解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发,文件无法拖放到渲染窗口的一种奇怪情况,附原因和解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 moment.js日期时间插件,设置中文语言的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 moment.js日期时间插件,设置中文语言的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 使用npm安装electron失败的可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 使用npm安装electron失败的可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 Windows11系统cmd终端提示“命令提示符已被系统管理员停用”的一种可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 Windows11系统cmd终端提示“命令提示符已被系统管理员停用”的一种可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴
electron开发中使用nodemon进行热更新的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴
admin · 2024-01-20 · via 孙琪峥

1、在项目中安装nodemon依赖。

npm i nodemon -D

2、package.json中script中的start命令修改如下:

nodemon --exec electron . --watch ./ --ext .js,.html

之前尝试过electron-reloader插件,但是感觉不如nodemon好用。但是nodemon的热更新也有缺点,基本和渲染界面相关的都能及时更新,如果是主程序main.js中某些涉及nodejs模块的逻辑处理,还是需要重新手动执行npm start命令重启一下程序,总体来说使用感受还不错。