Hi there,
I noticed you're working on version 2.0, it would be nice to make the "zod" dependency actually optional, right now we'd get a runtime error if using the module without "zod" as dependency, see:
import { createEndpoint, createRouter } from "better-call";
const endpoint = createEndpoint("/item", { method: "GET" }, async (ctx) => {
return "ok";
})
const router = createRouter({ endpoint })
Bun.serve({
fetch: router.handler
})
This gives this error:
❯ bun run index.js
error: Cannot find package 'zod' from 'node_modules/better-call/dist/openapi.mjs'
Cheers
Hi there,
I noticed you're working on version 2.0, it would be nice to make the
"zod"dependency actually optional, right now we'd get a runtime error if using the module without"zod"as dependency, see:This gives this error:
Cheers