JamieMason / shrinkpack

Fast, resilient, reproducible builds with npm install.
https://www.npmjs.com/package/shrinkpack
MIT License
793 stars 38 forks source link

OptionalDependencies must also be removed from package.json #74

Closed palmerj3 closed 7 years ago

palmerj3 commented 8 years ago

According to NPM if you remove optionalDependencies in npm-shrinkwrap.json but they still exist in package.json NPM will install them anyways. I totally disagree with this behavior and will be working on a NPM PR to remove this behavior entirely. But I think you could handle this in shrinkpack.

Certainly removing optionalDeps from top level package.json would be doable but it's not clear to me right now if you will also need to handle this for lower level packages.

JamieMason commented 7 years ago

Closing as duplicate of #75 as there is more discussion in that thread.