Closed momentiris closed 6 years ago
Hi,
That's a defect and the only way to reflect changes in the main process is to restart Electron. @jschr perhaps we should modify the serve
script to restart "Electron" on changes in main?
Yeah that would improve the DX.
Alright, thanks!
@momentiris I've had an attempt to fix this issue. See the work-in-progress PR: https://github.com/jschr/electron-react-redux-boilerplate/pull/70
It's somewhat intrusive to restart the main process, but I guess we do that manually anyway, so perhaps overall not that bad.
Thats awesome! I am finishing up my school finals this week so was looking for a quick solution, so I ended up writing my own, using nodemon, wait-on and concurrently. Probably has it's own problems due to my limited experience as a beginner. But its here: https://github.com/momentiris/magicbrowser, if you guys want to have a look at how I did it. Ironically I have barely written any code for the main process yet.
Thanks alot again for adressing this!
Hi again. I was wondering about the dev script and the main process. "dev": "npm run private:compile -- --source-maps true && run-p -r private:watch private:serve", this rerenders or refreshes some process in the build script, and I see the application reloading, but in order for the changes made in the main process to take effect, I have to re-run the dev script. So for example, I can uncomment everything in ./main/index.js while running the dev script. The script will answer by reloading the application, but the build has not updated. Is this your intention or might there be something wrong here?
Thanks again.