Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze. Check out the components library on Chromatic https://www.chromatic.com/library?appId=63b58e306cfd32348fa48d50
Using exports in package.json means the types field is no longer used and types cannot be imported and results in the error below. I have added a types property to exports field to fix the issue
Could not find a declaration file for module '@ory/elements'. ‘XXXX/node_modules/@ory/elements/dist/index.mjs' implicitly has an 'any' type.
There are types at ‘XXXX/node_modules/@ory/elements/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@ory/elements' library may need to update its package.json or typings.ts(7016)
[x] I confirm that this pull request does not address a security vulnerability.
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added the necessary documentation within the code base (if appropriate).
Using
exports
inpackage.json
means thetypes
field is no longer used and types cannot be imported and results in the error below. I have added atypes
property toexports
field to fix the issueSee https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing for details.
The original
types
fields are left in place for use by older versions of Typescript.Checklist