aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/install/add-dev.md
blob: 3f7b74f9c73bd9b531c9c0e280bee4a9d6eea552 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
name: Add a development dependency
---

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

```sh
$ bun add zod --dev
$ bun add zod -d # shorthand
```

---

This will add the package to `devDependencies` in `package.json`.

```json-diff
{
  "devDependencies": {
+   "zod": "^3.0.0"
  }
}
```

---

See [Docs > Package manager](/docs/cli/install) for complete documentation of Bun's package manager.