Notes on Webpack Hot Module Replacement

It took me a few days to read through the relevant parts of the webpack and webpack-dev-server source code and figure out how to enable Webpack Hot Module Replacement for any project that doesn’t use the webpack-dev-server for serving the JS bundle. I wanted to use HMR with Vagrant running Docker for a local...