You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I'm working on a project that's using Playwright for its end-to-end tests. We're using bcryptjs for hashing passwords in our application, but we aren't able to do this from within a Playwright test. This seems to be because bcryptjs doesn't support ESM. Is there any plan for ESM to be supported? Is there a timeline for this?
(For clarity on why we're using bcryptjs within Playwright: When we create an example user for a test, we have to hash the password because the application code is going to decrypt it.)
The text was updated successfully, but these errors were encountered:
So although this was a module issue, it was related to how I was importing from bcryptjs in my ESM application. Specifically, I couldn't do named imports. Doing a default import works fine. That said, it would still be great if this package supported ESM -- especially since things are going that way moving forward.
For historical purposes, I'm going to retitle this issue and close it so that people don't get confused and think that ESM Support was added (or rejected).
ITenthusiasm
changed the title
ESM Support
Cannot Import from bcryptjs in a Playwright Test
Feb 28, 2024
Currently, I'm working on a project that's using Playwright for its end-to-end tests. We're using
bcryptjs
for hashing passwords in our application, but we aren't able to do this from within a Playwright test. This seems to be becausebcryptjs
doesn't support ESM. Is there any plan for ESM to be supported? Is there a timeline for this?(For clarity on why we're using
bcryptjs
within Playwright: When we create an example user for a test, we have to hash the password because the application code is going to decrypt it.)The text was updated successfully, but these errors were encountered: