Configure hot module reloading to work with react-universal-component

Share this video with your friends

Send Tweet

We will add configurations to our project to enable hot module reloading, so that our changes will update in the browser without a hard window refresh. We’ll need to add two packages to our project:

  • react-hot-loader
  • webpack-hot-middleware
Alex Kovacs
Alex Kovacs
~ 7 years ago

This course is pretty fast paced which is great, however would be also great to have the reason behind using some plugins and also pointers to detailed information on usage.

Otherwise all we do here is eating fish, not learning how to fish!

Tim Kindberg
Tim Kindberg(instructor)
~ 7 years ago

however would be also great to have the reason behind using some plugins and also pointers to detailed information on usage.

Thanks for the feedback. Which specific plugin (or other piece) would you like more explanation on?

Mathieu Schmidt
Mathieu Schmidt
~ 6 years ago

Hi,

Is the LimitChunkCountPlugin plugin required for this setup to work? I'm not sure to fully understand why we need it. Is it only for hot reloading and if not why do they have it here on the prod server config.

Tim Kindberg
Tim Kindberg(instructor)
~ 6 years ago

Is the LimitChunkCountPlugin plugin required for this setup to work?

I'm not sure if it's needed for production, but I did find that things did not work if I removed it from the development configuration.

Grant
Grant
~ 6 years ago

The github code package.json uses webpack 4 but the CommonsChunkPlugin has been deprecated and removed, see here:

https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693