To install an npm package under an alias:
bun add my-custom-name@npm:zod
You can now import the zod package as my-custom-name.
index.ts
import { z } from "my-custom-name";
z.string();
See bun install.
Runtime docs · Guides · Package Manager
To install an npm package under an alias:
bun add my-custom-name@npm:zod
You can now import the zod package as my-custom-name.
import { z } from "my-custom-name";
z.string();
See bun install.