israelg99 / sofweb

Sofweb: TypeScript + Angular 2 + Webpack + Electron + SASS SCSS + HTML5 + Bootstrap
MIT License
5 stars 0 forks source link

Add HMR support for Electron #1

Open yjose opened 8 years ago

israelg99 commented 8 years ago

Host a webpack-dev-server(It's already implemented, just comment it out) and apply the webpack.HotModuleReplacementPlugin in the dev-webpack config(same file in the link).

It's important to apply the webpack-target-electron-renderer plugin, this repo has it set up already, so don't worry about it.

Lastly, make Electron listen to your webpack-dev-server host, I suggest googling around as there are multiple ways you can achieve that and I'm not sure which is the best one.

If you manage to get it to work, make sure to pull request.