运行时包管理器打包器测试运行器代码检查格式化指南参考博客反馈

以不同名称安装包

要以别名安装一个 npm 包:

terminal
bun add my-custom-name@npm:zod

现在,您可以将 zod 包作为 my-custom-name 导入。

index.ts
import { z } from "my-custom-name";

z.string();

请参阅 bun install。