Closed RunOrVeith closed 3 days ago
Im not able to look into this yet but I took a glance at the reproduction and it didnt look minimal.
Can you remove anything that isnt necessary to reproduce the error?
No, sorry. This is as minimal as I can make it. I was unable to reproduce it with less than that. It's only a few lines, but of course the playwright implementation is more.
Playwright is somehow serializing the code inside addInitScript
and sending it to the browser. But this is a tsx issue because it works with node.
The steps to reproduce are (inside my example repo):
npm i
npx playwright install
npx tsx index.ts
The problem is also resolved with the workaround in https://github.com/evanw/esbuild/issues/2605#issuecomment-2146054255, so this might be a duplicate
Acknowledgements
Minimal reproduction URL
https://github.com/RunOrVeith/tsxPlaywrightBug
Problem & expected behavior (under 200 words)
I opened an issue with more information in playwright, but this is probably a tsx/esbuild issue.
Bugs are expected to be fixed by those affected by it
Compensating engineering work will speed up resolution and support the project