I have a Express server application which is bundled with webpack. The client side is also bundled with webpack and served by the server using webpack-dev-middleware and webpack-hot-middleware for HMR in development mode.
When I change a React component the change happens in the client-side as it should, the problem comes when I started using HMR.
As the components is hot-replaced in the client it utilizes the "new" version of the file, but the server is still stuck with the old one since it was bundled with webpack, therefore when using server-rendering the two results are different. Is there a way to change the server as well when changing a component?