prisma-zod-generator
prisma-zod-generator copied to clipboard
Doesn't work for ESM modules
Bug description
All the imports would need to end with .js
extension.
How to reproduce
Try to use in a ESM module.
Expected behavior
No response
Prisma information
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
@olalonde Is there really no way but to use a js
extension?
That's the only way as far as I know. See https://www.typescriptlang.org/docs/handbook/esm-node.html
relative import paths need full extensions (e.g we have to write import "./foo.js" instead of import "./foo")
Just curious if there's an update here? Did you manage to find any work arounds @olalonde Would hate to not use such an awesome package just because of this ESM constraint
I would also be interested in a generator option for setting if you're using ESM modules of commonjs modules (like in packege.json). This is the only reason I can't use it.