smartprocure/futil-js

Move lodash to peer dependencies?

sadasant opened this issue · 6 comments

Should we move lodash to peer dependencies for futil? I'm wondering if that's adding extra weight to our downloads.

Probably a good idea

wmzy commented

Don't do that.
futil-js is not a plugin of lodash.
People use futil-js,they just run npm i futil-js and need not to know lodash.

See more:
http://npm.github.io/using-pkgs-docs/package-json/types/peerdependencies.html
https://stackoverflow.com/questions/26737819/why-use-peer-dependencies-in-npm-for-plugins

BTW,you should move babel-pollyfill to devDependencies.

That makes a lot of sense. In our case, it leads to some bundle size increases, but I think we might be able to work around that if we use a non-built version of futil 🤔

babel-polyfill is not a dev dependency because I'm pretty sure the built version does actually require it. @wmzy do you have any insight on that? If so we are definitely open to moving it

wmzy commented

Whether to use the babel-polyfill should be determined by the execution environment of the user's app.
I think just Illustrated in the documentation which ES features be used is a good idea.

Thanks, that makes sense. I'll create a follow-up issue for this and close this one since we're not going to move lodash out of peer-dependencies.

wmzy commented

You can release multi versions like rollup-starter-lib