Package - Peer Dependency
Table of Contents
About
Peer Dependencies are dependency that are provided by a third party. ie
- a framework
- or a script in your HTML page
It indicates that:
- your (module|package) cannot be used without this dependency.
- the user should provide this dependency
- the dependency will not be available in the distributed artifact.
Articles Related
Example
- jQuery
- Plugin.
Management
Declaration
- Javascript Package - Package.json - They are declared in the peerDependencies property of the package.json file.
- Bundler - You may have to change the configuration of your bundler. Example webpack
Add
yarn add [package] --peer