Skip to content
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

Prefer fp-ts/Either over fp-ts/lib/Either #419

Merged
merged 1 commit into from Jun 23, 2022

Conversation

ryota-ka
Copy link
Contributor

@ryota-ka ryota-ka commented Jun 23, 2022

Unlike other import statements, this one points not to fp-ts/Either but to fp-ts/lib/Either, which is a CommonJS file (node_modules/fp-ts/lib/Either.js).
This causes an error when you import @hookform/resolvers/io-ts from a ES module, where a file extension is mandatory in import sources, as fp-ts/lib/Either lacks .js extension.
Importing from fp-ts/Either (just as all other imports do so) solves the problem, since the package.json switches CJS/ESM.

@bluebill1049 bluebill1049 merged commit 7951951 into react-hook-form:master Jun 23, 2022
@bluebill1049
Copy link
Member

thanks for contributing.

@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.9.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ryota-ka ryota-ka deleted the fp-ts/Either branch June 24, 2022 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants