The question to life, universe and everything (including [the-answer](https://github.com/rich-harris/the-answer) !)
npm install the-questionThe question to life, universe and everything (including the-answer !)
dependencies should be listed asexternal in rollup.
Will delegate dependency management to the caller.
May end up with two differents package versions in parent.
You can look at lodash here in src/index.js and dist/index.es.js.
rollup config external should contain the list of keys from peerDependencies.
``js`
external: Object.keys(pkg.peerDependencies),
peerDependencies should be listed asexternal in rollup.
Tell the caller developper to install the peer dependency, but without package manager resolution.
May be useful for tighly coupled packages (eslint with an eslint plugin or react for a react component).
Harder to understand for humans though, but you will be 100% certain that the same instance of the library is shared between package and caller.
should not be listed as external in rollup.If you use a package internally, it will be included and "tree-shaked" by rollup.
You can look at
the-answer` here in src/index.js and dist/index.es.js.Useful if you do not want your caller to know the library used.