Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpackv5 webpack-hot-server-middleware Compatibility problems #426

Open
ygs-code opened this issue Aug 15, 2022 · 1 comment
Open

webpackv5 webpack-hot-server-middleware Compatibility problems #426

ygs-code opened this issue Aug 15, 2022 · 1 comment

Comments

@ygs-code
Copy link

webpack version:
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-middleware": "3.7.3",
"webpack-hot-server-middleware": "^0.6.1",
Node.js version: 16
Operating System: mac windows
Additional tools: vscode
I was using webpack webpack-dev-middleware Webpack-hot-server-middleware for Node SSR Webpack-hot-server-middleware Hot updates will report errors in Webpack V5.
error message:

client.8d64ed71.js:55443 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
at self.webpackHotUpdatewebpack_demo1 (client.8d64ed71.js:55443:46)
at client.cbbc1ef178f03782094c.hot-update.js:2:38
self.webpackHotUpdatewebpack_demo1 @ client.8d64ed71.js:55443
(anonymous) @ client.cbbc1ef178f03782094c.hot-update.js:2
vendors.8d64ed71.js:29085 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
at self.webpackHotUpdatewebpack_demo1 (vendors.8d64ed71.js:29085:46)
at vendors.cbbc1ef178f03782094c.hot-update.js:2:38
I think Webpack-hot-Server-middleware is not compatible with Webpack V5. I hope you can upgrade Webpack-hot-Server-middleware。

Also, when I use WebPack V5, Webpack-dev-middleware is not upgraded to the highest V5 version, otherwise, res.getHeader is undefined。
I an error making project address: https://github.com/qq281113270/react-ssr-lazy-loading

@ygs-code
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant