mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
* Add ecosystem guides * Update titles * Rename stric * Add unlink and fetch guides * Add formdata guide * Tweak title * Moar
407 B
407 B
name
| name |
|---|
| Add an optional dependency |
To add an npm package as a peer dependency, use the --optional flag.
$ bun add zod --optional
This will add the package to optionalDependencies in package.json.
{
"optionalDependencies": {
+ "zod": "^3.0.0"
}
}
See Docs > Package manager for complete documentation of Bun's package manager.