-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
File Compression #3
Comments
I would be interested in this feature. Is this still being worked on? |
This would be great for me as well. Can't serve my gzipped js files. |
- still optimized - adds ETag support to "dev" mode - adds brotli/gzip support to "dev" mode - Related: #3
Available in current Decided not to include zopfli – at least at this time. When enabled, |
@lukeed This is great news - thanks for the addition! |
As a convenience,
sirv-cli
should compress your files on startup. This would happen only once, immediately before usingtiny-glob
to read & cache the files.I'm 90% sure the compression would have to be file-by-file, rather than doing the entire directory at once. This is because we'd have to see if the
foobar.{hash}.gz
(or whatever) file exists first, and only produce a compressed version if it doesn't exist... otherwiseETag
values would be wrong.The
sirv
module should also take acompress
option. It won't do any compressing (since it's the runtime), but it'll prefer/look to serve the compressed file over the original.Allowed Values:
gzip
(default)brotli
zopfli
CLI Flags
-c, --compress, 'Enable file compression with specified format', 'gzip'
The text was updated successfully, but these errors were encountered: