rogeriochaves / npm-force-resolutions

Force npm to install a specific transitive dependency version
567 stars 28 forks source link

feature: remove transitive dependency #42

Open raDiesle opened 3 years ago

raDiesle commented 3 years ago

Hello,

i would like to skip a dependency to be downloaded. There are several reasons when this can make sense, such as prevent downloading of huge libraries

Therefore my suggestion would be to support something like:

resolutions : { @icon/material: null }

which will delete it from shrinkwrap.json file

vs4vijay commented 3 years ago

If you prevent downloading any package, won't that break the application / code / feature?

raDiesle commented 3 years ago

So this is the bad on npm: it downloads peer dependencies, which are not required to bundle your files, but required e.g. for developing on the third party dependencies.

If I would be able to ignore it, I would be also able to explicit define my own version of the dependency taken by peer dependencies, I guess