res.getHeader function missing for webpack-dev-middleware
Cauldrath opened this issue · 5 comments
- Node Version: N/A
- NPM Version: N/A
- koa Version: N/A
- koa-webpack Version: 5.2.1
Expected Behavior
webpack-dev-middleware executes without throwing an error.
Actual Behavior
Error is thrown on accessing res.getHeader.
How can we reproduce the behavior?
Attempt to pull down the repo and execute.
webpack-dev-middleware made an update to use res.getHeader in 3.6.1:
webpack/webpack-dev-middleware@v3.6.0...v3.6.1#diff-d7dfcb350720309421bbb465055aafdfR82
The res object being sent to the middleware does not include this function, so an error is thrown:
Line 30 in e2fcf19
The version of webpack-dev-middleware either needs to be locked to 3.6.0 or a getHeader function would need to be added.
It's generally considered to be bad form to remove all or portions of an issue template. Just a heads up, when you blow by something like this in the template:
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.
... that can miff the maintainers.
While I don't have a lot of time to actively maintain the project, I'm completely open to pull requests for things like these.
Sorry, I put back the sections that didn't appear applicable or informative. I could make a PR to lock the webpack-dev-middleware version to 3.6.0, but I'm not familiar enough with the functionality of this module to implement a new getHeader function in a timely manner.
Please, lock the version so recent projects are not impacted by it
@JeanBarriere that's not a helpful comment. please use the reaction buttons if you would like to show support for a post. otherwise, you're just creating noise.
If you're using webpack-serve, or another dev server that uses koa-webpack, you may want to take a look at https://github.com/shellscape/webpack-plugin-serve.
This issue has the help wanted
tag, which means it will require community contribution to resolve.
Fixed in #110