first step
devServer: { contentBase: path.join(__dirname, 'dist'), compress: true, port: 9000, hot: true },
Part II
plugins: [ new HtmlWebpackPlugin(), new webpack.HotModuleReplacementPlugin() ]
The third part (file entry, entry)
if (module.hot) { module.hot.accept() }