-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Make compression in webpack-dev-server configurable #1633
Comments
Not strictly opposed to this, but can we somehow only restrict compression to the assets WDS serves, and not to anything proxied? |
Until a solution arrives (like proposed by @gaearon), some may find it useful to work around the issue by adding a |
Closing as stale. If somebody wants to fix this please send a PR. |
This is needed for proxies that interfere with the request (such as caching). This was the case with the `create-react-app`, when proxying requests to the dev-server backend to your real backend. See this issue: facebook/create-react-app#1633 (comment) . Maybe this header isn't always desired, but I didn't know a good way to make this configurable other than passing a 3rd argument to this `pipe` function, or maybe an extra parameter to the constructor allowing users to overwrite some of these headers if they want.
This has most certainly caused problems with Server-Sent-Events. I'm using this in my project, and have determined that the gzip compression is causing the event connection to close. I'm struggling to find a way to unset this - however, it's not clear to me why this change was made to default with compression enabled, since in a development environment it's a low-impact issue to have non-compressed files served. The trade-off of making SSE unusable doesn't seem to have been a good call. Thanks. |
@don-p as a quick workaround, setting But I agree, enabling compression on Webpack Dev Server is low-impact. |
I'm running into the same issue as #966 (comment) when using SSE via a proxy.
Would it be possible to make the compression configurable via env?
The text was updated successfully, but these errors were encountered: