Memory leak with Webpack4
abyasasvi opened this issue · 1 comments
The Issues page for this repository is not a support forum, it is for reporting potential bugs in this module, which
composes webpack-hot-middleware and webpack-dev-middle for use with koa2.
If you have arrived here because you cannot get webpack-hot-middleware
or webpack-dev-middleware working, please review the documentation
for the respective middleware you are experiencing a problem with. If you proceed with this form, please fill out all fields, or your issue may be closed as "invalid." Please remove this header to acknowledge this message.
- Node Version: tried 9 and 10
- NPM Version: 6.2.0
- Yarn Version: 1.3.2
- koa Version: 2.3.0
- koa-wepback Version: 5.1.0
If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.
// webpack.config.js
// app.js
Expected Behavior
HMR should work
Actual Behavior
when HMR was enabled when code changes, it starts compiling and then there is a memory leak that crashes the whole app
How can we reproduce the behavior?
It is very hard to replicate our whole configuration.
I can mention the plugins we use:
name-all-modules-plugin
circular-dependency-plugin
extract-css-chunks-webpack-plugin
NoEmitOnErrorsPlugin
stats-webpack-plugin
write-file-webpack-plugin
This module only composes webpack-dev-middleware, and instantiates webpack-hot-client. Your issue likely lies in one of those two projects, or webpack itself. Nothing in this module would cause a memory leak with regard to HMR.