Closed bruceharrison1984 closed 4 months ago
Hi @bruceharrison1984
This is because @asteasolutions/zod-to-openapi
used internally by Zod OpenAPI does not support ES Modules. So, the error will not occur if you set vite.config.ts
as follows.
export default defineConfig({
ssr: {
external: ['@asteasolutions/zod-to-openapi']
},
plugins: [honox()]
})
Awesome, I wondered if it was something along those lines. Thanks!
Yeah, the matter of CommonJS/ES Modules is annoying.
Attempting to use
@hono/zod-openapi
with HonoX results in the following error:The following was (attempted) used to get this going:
It doesn't seem to matter where in the router tree
@hono/zod-openapi
is injected, the error persists until it is replaced with normalhono
instances.