Skip to main content
要添加一个 npm 包作为 peer 依赖,使用 --peer 标志。
terminal

这会将该包添加到 package.json 中的 peerDependencies
package.json

除非在 peerDependenciesMeta 中将 peer 依赖标记为可选,否则 bun install 默认会安装它们。
package.json

请参阅 bun install