electron-react-typescript-webpack-boilerplate icon indicating copy to clipboard operation
electron-react-typescript-webpack-boilerplate copied to clipboard

Hot reload react

Open softwarecurator opened this issue 4 years ago • 3 comments

a hot reloader would be amazing

softwarecurator avatar Jan 18 '21 08:01 softwarecurator

a hot reloader would be amazing

Do you mean to auto reload the main process? Coz I believe the renderer process is already reloadable if you use the command npm run dev to start Webpack in development mode. You just need to refresh the page in your electron app whenever you've changed something for the renderer process once the app is started.

iamWing avatar Jan 18 '21 22:01 iamWing

Do you mean to auto reload the main process? Coz I believe the renderer process is already reloadable if you use the command npm run dev to start Webpack in development mode. You just need to refresh the page in your electron app whenever you've changed something for the renderer process once the app is started.

Hi! That would be nice if the refresh is done automatically, or if is possible on npm run dev be on some special url where the hot reaload will works, webpack providing a devServer for this purposes https://webpack.js.org/configuration/dev-server/

but good job anyway!

miuan avatar Mar 07 '21 11:03 miuan

Do you mean to auto reload the main process? Coz I believe the renderer process is already reloadable if you use the command npm run dev to start Webpack in development mode. You just need to refresh the page in your electron app whenever you've changed something for the renderer process once the app is started.

Hi! That would be nice if the refresh is done automatically, or if is possible on npm run dev be on some special url where the hot reaload will works, webpack providing a devServer for this purposes https://webpack.js.org/configuration/dev-server/

but good job anyway!

Okay I got what you mean now. Right now the dev server is not being invoked on neither the commands included in this project. I'm not sure if the dev server works with electron apps or not but I'll give it a try later when I have time. Meanwhile you may wanna implement that yourself, as I'm pretty busy recently and not sure when I'll be able to do more development on this boilerplate, so a pull request is very much welcome.

My initial thoughts on it would be to change the dev server options in webpack.config.js, then edit the npm run dev command in package.json to invoke the dev server by calling npx webpack serve. You may give it a try.

iamWing avatar Mar 22 '21 12:03 iamWing

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Sep 13 '22 17:09 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issus is still relevant, linking to this one.

github-actions[bot] avatar Sep 20 '22 17:09 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using Discussions for questions.

github-actions[bot] avatar Oct 21 '22 00:10 github-actions[bot]