Skip to content

Comments

Add lodash as a peer dependency#318

Open
sfarthin wants to merge 2 commits intosmartprocure:masterfrom
sfarthin:peerDependency
Open

Add lodash as a peer dependency#318
sfarthin wants to merge 2 commits intosmartprocure:masterfrom
sfarthin:peerDependency

Conversation

@sfarthin
Copy link

@sfarthin sfarthin commented Mar 4, 2020

When using this package, consumers most likely already use lodash. Making lodash a peer dependency will make sure lodash is not duplicated when bundling JS for the client-side.

As a peer dependency, lodash will be automatically be installed (if not already) at the root level node_modues same as futil-js.

Note that the version is lenient so both lodash 4.17.1 and lodash 4.17.2 get installed on the root. See Node.js docs for more information.

Steven Farthing added 2 commits March 4, 2020 12:51
Since webpack does not bundle this dependency, the consumer is required to install lodash. Setting this as a peer dependency makes that more explicit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant