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

please support usage with import, not just require #892

Closed
mariusa opened this issue Sep 14, 2021 · 3 comments
Closed

please support usage with import, not just require #892

mariusa opened this issue Sep 14, 2021 · 3 comments

Comments

@mariusa
Copy link
Contributor

mariusa commented Sep 14, 2021

README mentions usage only with require
As some projects are moving to using import instead, would you please support usage with import as well, for node 16.x?

@recrsn
Copy link
Collaborator

recrsn commented Sep 14, 2021

Should the import does not work with the CommonJS interop already?

@mariusa
Copy link
Contributor Author

mariusa commented Sep 14, 2021

Could you please add to README how to use import?

@perry-mitchell
Copy link

Works fine for me with import:

import bcrypt from "bcrypt";

// later
await bcrypt.compare(password, hash);

fast-facts pushed a commit to fast-facts/node.bcrypt.js that referenced this issue Jun 17, 2022
@recrsn recrsn closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants