jhen0409 / react-chrome-extension-boilerplate

Boilerplate for Chrome Extension React.js project
MIT License
2.14k stars 388 forks source link

Changes to backgound script [background.js] doesn't trigger hot reloading #52

Open psych0der opened 7 years ago

psych0der commented 7 years ago

Unlike other files, changes made to background.js doesn't propagate automatically and requires manual reloading of the chrome extension. Any workaround?

jhen0409 commented 7 years ago

Yes it doesn't, if you want background scripts to support Hot reload, you have to make more extra works, like glenjamin/ultimate-hot-reloading-example made Express server hot reload.

Also, a correctly behavior is automatically full-reload (see webpack/replace/log-apply-result.js#L16-L18), because we changed to webpack-hot-middleware, so currently it doesn't work. The code should move to webpack-hot-middleware/process-update.js, I'll update it.