Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(test runner): esm loader in old Node versions (#34330)

Dmitry Gozmanaeec0c0e36d8
diff --git a/packages/playwright/src/common/esmLoaderHost.ts b/packages/playwright/src/common/esmLoaderHost.ts
index 9b5b4f9b8c..9daa71107c 100644
--- a/packages/playwright/src/common/esmLoaderHost.ts
+++ b/packages/playwright/src/common/esmLoaderHost.ts
@@ -30,7 +30,6 @@ export function registerESMLoader() {
const { port1, port2 } = new MessageChannel();
// register will wait until the loader is initialized.
require('node:module').register(url.pathToFileURL(require.resolve('../transform/esmLoader')), {
- parentURL: url.pathToFileURL(__filename),
data: { port: port2 },
transferList: [port2],
});