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
This is because the build is CommonJS format, with no ES module variant. Which I guess is because you're using Webpack. For this feature request, you'd need to either switch to Rollup (IMO a better fit for npm packages) or wait for Webpack to support it (it's in the works for V5).
The text was updated successfully, but these errors were encountered:
@GeorgeWL could you elaborate? Are you referring to Webpack in the build of Playwright? Or are you proposing that users of Playwright use Webpack to transpile their code?
I'm using ES modules with Node 14. I can import Playwright like this:
But not like this:
This is because the build is CommonJS format, with no ES module variant. Which I guess is because you're using Webpack. For this feature request, you'd need to either switch to Rollup (IMO a better fit for npm packages) or wait for Webpack to support it (it's in the works for V5).
The text was updated successfully, but these errors were encountered: