colinskow / angular-electron-dream-starter

:tada: An Angular Electron Starter kit featuring Webpack, Angular 4 (Router, Http, Forms, Services, ngrx, Tests, E2E, Coverage), Karma, Spectron, Jasmine, Istanbul, and TypeScript
MIT License
162 stars 54 forks source link

Reload is not available with electron #14

Closed bokzor closed 6 years ago

bokzor commented 6 years ago

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

okonon commented 6 years ago

@colinskow I am seeing same thing as @bokzor could you point us in right direction? Thanks a lot

okonon commented 6 years ago

Actually never mind started to work for me :)

colinskow commented 6 years ago

I've noticed this too. Sometimes the app loads blank. This is caused by a race condition between the main and renderer Webpack builds on the dev server. If the renderer process build is not finished when Electron starts it generates an error. The only solution I've found is to refresh manually by hitting CTRL-R. This should never happen with your production builds.

colinskow commented 6 years ago

I checked my code and it appears I fixed this a while back by forcing the main build to finish before the renderer build starts. If you can reproduce this with the latest version of the repo, feel free to re-open.

mrmashal commented 6 years ago

@colinskow Could you please tell me where was the fix? I have replaced some theme for the src/app (along with some required adjustments) and I'm facing the blank screen on page reload. I'm not sure if I've accidentally overwritten some important code. The theme does not use ngrx; Could it be related to the issue?