laoqiren
laoqiren

Reputation: 3877

Webpack-dev-server doesn't hot refresh my client file

I'm using webpack-dev-server, and this is my config:

devServer: {
        hot: true,
        contentBase: "dist/"
    },

I open in localhost:8080/webpack-dev-server, but when the bundle.js changed, the client just alert that app upload, the page didn't refresh automatically. Why didn't it refresh while it knows the bundle.js has been changed? Thanks a lot.

Upvotes: 1

Views: 350

Answers (1)

Damien Leroux
Damien Leroux

Reputation: 11693

Your webpack config lacks the react hot loader.

Updating bundle.js is not enough to reloader UI. Reader react-hot-loader#usage and add it to your web pack config

Upvotes: 1

Related Questions