Making iltorb an optional dependency to reduce default package footprint
kachkaev opened this issue · 2 comments
With the addition of compress: true / false
in #16, the module has become pretty heavy. It adds over 3MB of binaries via iltorb
, which are not needed for most users. The fact that cacheable-response
brings in binaries also makes its setup potentially error-prone on systems for which the binaries are not available. When the app is deployed (e.g. via docker), the size of the artifact also increases.
Given that compress
is false
by default and that the feature was added only 8 days ago, would it be possible to make iltorb
an optional peer dependency? That should help the majority of users quite a lot.
An example of a module that does not install all its dependencies by default is https://github.com/cyrilwanner/next-optimized-images, if that's interesting. WDYT?
I'm totally agree, we can remove it from dependencies. Can you make a PR?
Glad to know you're for it! I might have some time this Sunday, but if you want to go ahead before then, feel free! 😉