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

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

z.string();

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