initial commit

This commit is contained in:
i2p
2026-08-27 21:09:14 +00:00
commit a5b6d59437
12681 changed files with 3253832 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
---
title: Add an optional dependency
sidebarTitle: Add an optional dependency
mode: center
---
To add an npm package as an optional dependency, use the `--optional` flag.
```sh terminal icon="terminal"
bun add zod --optional
```
---
This adds the package to `optionalDependencies` in `package.json`.
```json package.json icon="file-json"
{
"optionalDependencies": {
"zod": "^4.0.0" // [!code ++]
}
}
```
---
See [`bun install`](/pm/cli/install).