Skip to content

Commit e09eb9a

Browse files
committed
Add note on using the ESM variant in the browser
1 parent 58333a1 commit e09eb9a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ import bcrypt from "bcryptjs";
4242

4343
Replace `TAG` respectively `VERSION` with a [specific version](https://github.com/dcodeIO/bcrypt.js/releases) or omit it (not recommended in production) to use latest.
4444

45+
When using the ESM variant in a browser, the `crypto` import needs to be stubbed out, for example using an [import map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap). Bundlers should omit it automatically.
46+
4547
### Usage - Sync
4648

4749
To hash a password:

0 commit comments

Comments
 (0)