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

推荐订阅源

Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
量子位
美团技术团队
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
月光博客
月光博客

孙琪峥

CQG QTrader Desktop Crack only Lifetime [x86x64] Stable GitHub Office LTSC Super-Lite [QxR] - 孙琪峥 Microsoft Office 2019 Enterprise E5 ARM Activated [KMS-VL-ALL] KMS Activation Code Qwen3.5-4B-GGUF on Copilot+ PC Full Speed NPU Mode 007: First Light Deluxe Edition Tiny Girl Repack Gears of War: E-Day Pre-Installed Windows MediaFire Code Vein II Deluxe Edition Portable Game +Patch gDrive UltraISO Portable + License Key [no Virus] [Lifetime] .zip AutoCAD Crack tool [Final] .zip Marvel’s Spider-Man Remastered Crack GOG Release Updated PC Microsoft Office 2016 Internet Archive Minimal Setup KMS Activation Code M365 Auto Setup Reddit [KMS-VL-ALL] Quick Run tiny-random-LlamaForCausalLM No Admin Rights Office 2019 x64 Digital License One-click Setup French Metro Awakening Deluxe Edition (& no VR mod) Cracked Update Portable Game for Windows ots29xgdb1w6jq5n - 孙琪峥 端午安康!博客进行了主题升级 - 孙琪峥 群晖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开发,文件无法拖放到渲染窗口的一种奇怪情况,附原因和解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴
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命令重启一下程序,总体来说使用感受还不错。