-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: enable compress
by default
#3303
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3303 +/- ##
=======================================
Coverage 95.55% 95.56%
=======================================
Files 34 34
Lines 1260 1262 +2
Branches 357 358 +1
=======================================
+ Hits 1204 1206 +2
Misses 52 52
Partials 4 4
Continue to review full report at Codecov.
|
hm, do you think it should be |
Yes, I also see it in TODO https://github.com/webpack/webpack-dev-server/projects/1#card-19879364 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need update docs
3dc8553
to
50f200a
Compare
To run this example, run this command in your console or terminal: | ||
|
||
```console | ||
npm run webpack-dev-server -- --open --no-compress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we run webpack serve right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it is script
webpack-dev-server/package.json
Line 32 in 88468b6
"webpack-dev-server": "node examples/run-example.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change it to npx webpack serve
in future PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will take care
@snitin315 I thought that reading (and writing) the content served in the memory - is the fastest thing that can be possible. And adding compression for the in-memory server will only lead to more CPU usage, and may slow down a feedback loop for the developer (longer refresh time). In theory, after this change, we will pay more CPU load for in-memory content compression, and un-compression (by Express and the browser). 🤔 |
@Den-dp yes, but in other case HMR and live reloading will be faster because you will get compressed sources, we collect feedback and maybe revisit it, but I think it is better to have fast development env |
@alexander-akait looks like @sokra also hit a similar problem with enabling compression by default webpack/webpack#13962 |
it is another problem |
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
Enable
compress
by defaultBreaking Changes
Maybe
Additional Info
No