-
Notifications
You must be signed in to change notification settings - Fork 45
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
Types are not correctly exported for a package supporting both ESM and CJS #176
Comments
Thanks for reporting this. I will try to fix it soon. However, did you try using a different |
@torifat I did, but thought I'd report it anyway since that's not always a solution for everyone. Posted a PR with a fix that works for me locally 👍 |
I will have a look. I was thinking about doing something similar to what I did in one of my other project for maximum compatibility. |
Yup, it's pretty much that! 👍 |
@torifat |
…for pnpm Patch required for better-ajv-errors as they declare their types incorrectly. See atlassian/better-ajv-errors#176, fix based on atlassian/better-ajv-errors#177 Updates tsconfig Bumps dependency versions
Context
The
typings.d.ts
are currently only exposed via thetypes
field in package.json, which results in the following error in TypeScript:Potential fix
Follow the guidelines listed here: https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing
Basically, you would need to add a
types
field to eachexports
entry in package.json, both pointing to unique files.Edit:
PR with fix: #177
The text was updated successfully, but these errors were encountered: