Skip to main content
要以别名安装一个 npm 包:
terminal
bun add my-custom-name@npm:zod

现在可以通过 my-custom-name 来导入 zod 包。
https://mintcdn.com/ikxin/42j8wRmGt8kDDLLK/icons/typescript.svg?fit=max&auto=format&n=42j8wRmGt8kDDLLK&q=85&s=a2a397cd68603d207db5c5b5d620260aindex.ts
import { z } from "my-custom-name";

z.string();

完整的 Bun 包管理器文档请参见 文档 > 包管理器