You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial intention of the Node server was to just render the client react app and serve static assets which is why the webpack server bundle get's hot reloaded but the regular api routes don't.
We can't use nodemon to restart the server every time because that'd cause the webpack middlewares to restart which would be sloooooow so it'd be good to investigate a nice solution for this...may have to start two servers and proxy requests from the API server to the dev server although this is something I was hoping to avoid.
The text was updated successfully, but these errors were encountered:
@monteiz I recently implemented webpack-hot-server-middleware on another project where the api was reasonably substantial so we needed live reload.
The only solution I found was to use nodemon on the main server and proxy requests to a custom dev server which mounts webpack-dev-middleware and webpack-hot-server-middleware. It works fine but just means you need to start up two servers during development.
The initial intention of the Node server was to just render the client react app and serve static assets which is why the webpack server bundle get's hot reloaded but the regular api routes don't.
We can't use
nodemon
to restart the server every time because that'd cause the webpack middlewares to restart which would be sloooooow so it'd be good to investigate a nice solution for this...may have to start two servers and proxy requests from the API server to the dev server although this is something I was hoping to avoid.The text was updated successfully, but these errors were encountered: