Is your feature request related to a problem? Please describe.
I want to use the fs driver and another cloud driver. I might not need S3 thus I won't need the aws-sdk dependency as well
|
"dependencies": { |
|
"aws-sdk": "^2.1058.0", |
|
"file-type": "^17.1.1", |
|
"fs-extra": "^10.0.0", |
|
"rxjs": "^7.5.2" |
|
}, |
That dep is quite huge. Having that installed doesn't make much sense in my use case

Describe the solution you'd like
Moving hard dependencies that are driver-specific (like fs-extra and aws-sdk) to optional peer dependencies list


Describe alternatives you've considered
I can use overrides from NPM v8+ or resolutions from Yarn to override those deps to some "noop" one like this one. But this sounds a bit hacky and not reliable to me as those drivers are not lazily loaded.
With this approach, using Yarn, my node_modules size becomes 5x smaller.
Additional context
Having such feature will problably require a major release because now users will need to install those deps beforehand.
At same time, this feature will we could to make the package size smaller regardless of how many drivers are supported.
Is your feature request related to a problem? Please describe.
I want to use the fs driver and another cloud driver. I might not need S3 thus I won't need the
aws-sdkdependency as wellnest-storage/package.json
Lines 42 to 47 in add9803
That dep is quite huge. Having that installed doesn't make much sense in my use case
Describe the solution you'd like
Moving hard dependencies that are driver-specific (like
fs-extraandaws-sdk) to optional peer dependencies listDescribe alternatives you've considered
I can use
overridesfrom NPM v8+ orresolutionsfrom Yarn to override those deps to some "noop" one like this one. But this sounds a bit hacky and not reliable to me as those drivers are not lazily loaded.With this approach, using Yarn, my
node_modulessize becomes 5x smaller.Additional context
Having such feature will problably require a major release because now users will need to install those deps beforehand.
At same time, this feature will we could to make the package size smaller regardless of how many drivers are supported.