Installation
Relay is published as @0xhq/relay and ships as ESM.
Make sure your project declares "type": "module" or uses a bundler that understands .ts/.mjs outputs.
Add the package
pnpm
pnpm add @0xhq/relayVerify your toolchain
- TypeScript projects should keep
moduleResolutionset tonode16/nodenextso the exported.tsentry points resolve correctly. - Frameworks (Next.js, Astro, etc.) usually support ESM bundles out of the box, but confirm the build output can resolve
.tssources fromnode_modules. - Relay has no runtime peer dependencies beyond React (if you use
useRelayin components), but you will need to polyfillfetchorcryptoin environments that lack them (e.g., older Node.js versions).