Skip to content
NewBun 1.4.5 is out. Release notes
AphrodyBun

Guides · Package Manager

Add a development dependency

Add an npm package to devDependencies with bun add --development or its -d shorthand.

To add an npm package as a development dependency, use bun add --development.

bun add zod --dev
bun add zod -d # shorthand

This adds the package to devDependencies in package.json.

{
  "devDependencies": {
    "zod": "^4.0.0" // [!code ++]
  }
}

See bun install.