Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
Hi there,
I am currently trying to make my lambda as lean as I can to reduce our cold start times. I noticed that this package pulls in quite a bit, and also uses a couple outdated dependencies.
All my findings are based on the metafile esbuild produces, to check which code actually gets pulled at the end.
mime-db
seems to be about 130kb in size, just to check which mime-types are compressible. My API only ever deals with JSON data, and also sits in front of an API Gateway, so I was wondering if there is a way to make this optional? (or at least lazy-loaded)- The build currently has multiple different versions of
string_decoder
andreadable-stream
. I tried to see if there is an easy way to upgrade them all, but even newer versions ofthrough2
only depend onreadable-stream@3
, whereas version 4 is already out. I am using thepino
logger with fastify, which pulls in the up-to-date versions of these packages. - Similar case with
duplexify
:dependencies: @fastify/compress 7.0.3 ├─┬ peek-stream 1.1.3 │ └── duplexify 3.7.1 └─┬ pumpify 2.0.1 └── duplexify 4.1.3
I only ever need to compress responses, never decompress the input. Are there simpler/leaner/easier ways to do this?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels