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

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

z.string();

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