playwright
playwright copied to clipboard
Respect jsxImportSource from tsconfig instead of using mock jsx implementation
Currently playwright ignores whatever jsx configuration settings are used in your tsconfig and instead uses a mock implementation of jsx. This was introduced to resolve #22789. However, respecting the jsx configuration supplied in tsconfig is the better behavior. This would resolve the issue described in #26863.
Since playwright loads the tsconfig anyways, this change would be minimally invasive.
Hi @pavelfeldman - when I first raised this issue, I was not aware the number of upvotes it received would be meaningful, so I made no effort to engage the playwright community.
Since PR #26884 was closed, I started engaging with more people on this issue. Are willing to reevaluate accepting the PR in light of 16 upvotes?
Hey @pavelfeldman - this is the third most upvoted issue currently assigned to you. Can you give an update on your thoughts here? What can I do to get the ball rolling on this bug fix again? If I opened a new PR, would it get reviewed?
Hey @dgozman - it looks like @pavelfeldman is not able to engage on this one for now. Would you be willing to review a PR if I opened one up again?
I’ve just run into this issue as well. And it was quite hard to figure out what is going on, because the only thing I got was a react error Objects are not valid as a React child (found: object with keys {__pw_type, type, props, key}). If you meant to render a collection of children, use an array instead.
Is there any workaround available to disable the jsx mock? The only option I see at the moment is to precompile the typescript files on my own.
@lo1tuma - as far as I know, precompiling is the only option (except for version ~1.31.0 where this briefly worked). If you find a better alternative, please let me know 🙏.