shellscape/koa-webpack

Problem with webpack-dev-middleware@3.6.1

fridaythx opened this issue · 1 comments

I have a problem using koa-webpack in my project, when i access some path that webpack development server provided, i received an error log in console like below

UnhandledPromiseRejectionWarning: TypeError: res.getHeader is not a function

I checked the code where the error occurred and found out that the webpack-dev-middleware has just released 3.6.1 version at 2019-03-06 which has following code changes,

Bug Fixes

* do not overwrite Content-Type if header already exists (#377) (b2a6fed)
  • Node Version: v11.8.0
  • NPM Version: 6.5.0
  • koa Version: 2.7.0
  • koa-wepback Version: 4.0.0

Expected Behavior

the code runs as normal

Actual Behavior

An error occurred.

How can we reproduce the behavior?

with koa-webpack@4.0.0, webpack-dev-middleware@3.6.1 installed at the same time

duplicate #109