the-question

1.2.0 • Public • Published

the-question

The question to life, universe and everything (including the-answer !)

Really ?

Same as the-answer, I needed a small package to "really" try rollup including some example proposed in Integrating Rollup with other tools

Answers really found

dependencies

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.

peerDependencies

rollup config external should contain the list of keys from peerDependencies.

  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.

devDependencies

devDependencies 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.

Readme

Keywords

none

Package Sidebar

Install

npm i the-question

Weekly Downloads

0

Version

1.2.0

License

MIT

Last publish

Collaborators

  • jdeniau