-
Notifications
You must be signed in to change notification settings - Fork 369
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
feat(dev-server): enable gzip compression, add devServer.compress config #3723
feat(dev-server): enable gzip compression, add devServer.compress config #3723
Conversation
🦋 Changeset detectedLatest commit: 61b5c60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 207 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #3723 +/- ##
==========================================
+ Coverage 57.59% 58.15% +0.55%
==========================================
Files 672 643 -29
Lines 17794 17181 -613
Branches 3876 3752 -124
==========================================
- Hits 10249 9991 -258
+ Misses 6934 6589 -345
+ Partials 611 601 -10 ☔ View full report in Codecov by Sentry. |
Summary
Enable gzip compression by default, and add devServer.compress config. Keep the behaviour consistent with webpack-dev-server.
We use http-compression rather than compression, because compression does not support http2 and has not been maintained for a long time.
🤖 Generated by Copilot at 27c2188
This pull request adds a new feature to the
@modern-js/server
package, which is to enable gzip compression for the dev server. The feature is controlled by a newcompress
option in the dev server config, which istrue
by default. The pull request also updates the dependencies, the schema, the changeset, and the documentation for the feature.Details
🤖 Generated by Copilot at 27c2188
compress
property to dev server config schema and documentation (link, link, link)compression
middleware (link, link, link, link)Related Issue
Checklist
pnpm run change
.