Skip to content
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

Respect jsxImportSource from tsconfig instead of using mock jsx implementation #26936

Open
rubber-duck-software opened this issue Sep 7, 2023 · 5 comments

Comments

@rubber-duck-software
Copy link
Contributor

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.

@rubber-duck-software
Copy link
Contributor Author

rubber-duck-software commented Dec 28, 2023

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?

@rubber-duck-software
Copy link
Contributor Author

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?

@rubber-duck-software
Copy link
Contributor Author

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?

@lo1tuma
Copy link

lo1tuma commented Jul 12, 2024

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.

@rubber-duck-software
Copy link
Contributor Author

@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 🙏.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants