-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ES Modules? #219
Comments
Hi @yusukebe, We're definitely open to supporting ESM, however time we can put in the project is limited lately so I can't promise anything in terms of time. Will you be ok to help on this? I believe it should be mostly splitting our tsconfig to tsconfig.cjs.json and tsconfig.esm.json, updating the build scripts and adding to the package.json. Plus some testing of course, and it would help that you have a reproduction case through your library. What do you think? |
I just added a PR for this: #220 I haven't tested it yet however. |
@georgyangelov Thank you for your response! @danielkarso-pon So quick handling. Great! |
I encountered an issue while integrating the new Cloudflare Worker Vitest plugin. After hours of debugging, I noticed that openapi3-ts supports mjs, but @asteasolutions/zod-to-openapi (which import openapi3-ts) does not, makes vitest/cloudflare worker forces to use cjs, causing my test to fail. I hope to see this addressed in the next release. |
Fyi; if you want vitest fixed with
And in your
|
@yusukebe @ducan-ne @danielkarso-pon this should now be available as part of the v7.0.0 Release 🚀 . |
I've confirmed it works well! I'll release the new version of |
Hi.
First, thank you very much for creating such a great product. We use Zod to OpenAPI in
@hono/zod-openapi
. It can only be archived if Zod to OpenAPI exists.What I would like to know/suggest is supporting ES Modules. Currently, this only supports Common JS. However, some environments, such as Vitest, use only ES Modules and do not support Common JS. So the following problem occurred:
honojs/middleware#436
Would you happen to have any plans to support ES Modules? If so, it will be a great opportunity to work Zod to OpenAPI in more environments. Thanks!
The text was updated successfully, but these errors were encountered: