mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 03:48:56 +00:00
18 lines
455 B
Markdown
18 lines
455 B
Markdown
---
|
|
name: Add a peer dependency
|
|
---
|
|
|
|
To add an npm package as a peer dependency, directly modify the `peerDependencies` object in your package.json. Running `bun install` will install peer dependencies by default, unless marked optional in `peerDependenciesMeta`.
|
|
|
|
```json-diff
|
|
{
|
|
"peerDependencies": {
|
|
+ "zod": "^3.0.0"
|
|
}
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
See [Docs > Package manager](https://bun.sh/docs/cli/install) for complete documentation of Bun's package manager.
|