To make a module eligible for Hot Module Replacement (HMR), the simplest way is to add module.hot.accept() inside the module, like this:
module.hot.accept()
// ... if(module.hot) { module.hot.accept(); // This will make current module replaceable }