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
Got my expressjs server using dev and hot middlewares:
app// -- Webpack dev and hot middleware to enable webpack to serve client files with hot reloading.use(webpackDevMiddleware(webpackCompiler)).use(webpackHotMiddleware(webpackCompiler))
Make a change to any of the react files (i.e. header/index.tsx)
Observe browser console console warns from webpack-dev-middleware
Notes
This was working as-is in previous versions of the packages (webpack and react), so I think that something changed that has made them incompatible for hot-reloading (or at least auto refreshing the page). I've checked and checked again the webpack docs and v5 upgrade notes and there doesn't seem to be pretty much anything about what this error means, other than this obscure and uninformative API reference of the function where the error is coming from: https://webpack.js.org/api/hot-module-replacement/#apply
All of these are the latest version as of writing (already tried to see if updating everything solved it).
Expected Behavior
No console warn, page automatically reloads upon code change
Actual Behavior
Console warn and page doesn't automatically reloads upon code change
Code
Basic react front-end app with typescript, using ts-loader for webpack. For example, here's a file i'm doing a code change to:
Got my dev webpack config (this is a dev layer on-top of a base, but this contains all the relevant dev-related config like dev middleware stuff):
Got my expressjs server using dev and hot middlewares:
How Do We Reproduce?
npm install
npm start
Notes
This was working as-is in previous versions of the packages (webpack and react), so I think that something changed that has made them incompatible for hot-reloading (or at least auto refreshing the page). I've checked and checked again the webpack docs and v5 upgrade notes and there doesn't seem to be pretty much anything about what this error means, other than this obscure and uninformative API reference of the function where the error is coming from: https://webpack.js.org/api/hot-module-replacement/#apply
I've asked the question on https://gitter.im/webpack/webpack#, but that seems to have suffered an all-Q-no-A death.
The text was updated successfully, but these errors were encountered: