-
-
Notifications
You must be signed in to change notification settings - Fork 608
Description
I did some changes on my webpack config file in order to optimize generated css file size. The first move was removing my custom localIdentName
and use css-loader
's default. Surprisingly, [hash:base64]
performs poorer than [name][local][hash:base64:5]
considering gzip size.
That's probably because the default hash length is 23 (unique characters) and gzip can't do much about that kind of data (unique). Using a composed localIdentName
with a smaller hash portion leaves more space for gzip to work.
Do you guys think it's possible to change the default option? I understand that hash:base64
is probably the safest option but maybe we could get to another safe combination that also has better compression.
FYI this is what I'm getting at this project:
- bundled css total file size:
[hash:base64] |
[name][local][hash:base64:5] |
|
---|---|---|
raw | 137kb | 139kb |
gzip | 44kb | 27kb |