-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Bug]: Import/Require via globalSetup module stopped resolving in v1.45.0 #31725
Comments
This is related to unconditional registration of the ESM loader. When you |
I think this issue was caused by the removal of the Babel plugin |
@chrisbottin You are right, this was probably the exact change that triggered this behavior. However, the problem that should be fixed is that the ESM loader hangs. |
@dgozman Yes I understand it but is it possible to have an interim solution in Playwright while the ESM loader is getting fixed? |
@dgozman Would you be able to confirm whether a solution (e.g. config setting to enable the babel plugin again) is being considered? As we're currently fixed on version 1.44.1 temporarily and will need to soon make a decision as to the best course of action. |
@mehibbs There are no plans for the workaround right now. I'd recommend to avoid |
Version
1.45.0
Steps to reproduce
Something changed between Playwright 1.44.1 and 1.45.0 which has broken our current setup, and I haven't spotted anything related in the changelog.
Essentially I can distil the problem down to this:
playwright.config.ts
GlobalSetup.ts
config.js
other-config.js
Where in Playwright@1.44.1 we see "other-config" being printed - i.e. the second CJS module is loaded, where-as in Playwright@1.45.0 we hang on
require('./other-config')
.Granted it's a somewhat odd setup, however, it is a breaking change?
Moving entirely to ESM isn't practical at the moment in the real setup, so I'm hoping this is indeed a bug.
Expected behavior
I expect the second module "other-config" to be resolved and loaded.
Actual behavior
Running hangs on loading the second CJS module.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: