GuidesPackage manager

Add a peer dependency with Bun

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.

  "peerDependencies": {
    "zod": "^3.0.0"

See Docs > Package manager for complete documentation of Bun's package manager.