Using Webpack and HMR, I'd like to reload the AngularJS app without refreshing the browser.
My thinking is to do something like this:
module.hot
&& module.hot.accept('app.js', () => {
angular.module('app').reload()
})
Where the reload()
call will essentially reload the entire AngularJS app from scratch in the same way as if you changed routes in the router.
I don't have any particular preference on the actual solution. My goal is to not require a browser refresh every time an AngularJS file change occurs; rather, I'd like them to occur in the current browser session much like how React Hot Loader functions.