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

TS: Fix Fragments broken when jsxFactory is set #623

Merged
merged 1 commit into from
May 20, 2020

Conversation

marvinhagemeister
Copy link
Collaborator

@marvinhagemeister marvinhagemeister commented May 20, 2020

TypeScript is unable to resolve Fragments when the jsxFactory option is set. This is a known issue for years at the TypeScript project. But the problem is that it will still break, even when you set it to the default value 🤷

Fixes #622

Copy link
Collaborator

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! thanks!

@marvinhagemeister marvinhagemeister merged commit a856b02 into master May 20, 2020
@marvinhagemeister marvinhagemeister deleted the fix-ts-jsx branch May 20, 2020 21:09
@nojvek
Copy link

nojvek commented May 22, 2020

@marvinhagemeister hopefully we'll fix this in Typescript very soon microsoft/TypeScript#38720

@marvinhagemeister
Copy link
Collaborator Author

@nojvek That would be a dream come true! Thank you so much for picking this up 🙌

mdespuits pushed a commit to cision/rover-ui that referenced this pull request May 27, 2020
mdespuits added a commit to cision/rover-ui that referenced this pull request May 27, 2020
* Use Babel plugins to fix Fragments issue

developit/microbundle#623

A known issue in TypeScript:
microsoft/TypeScript#20469

* Remove default mention. It's not accurate here
bors bot pushed a commit that referenced this pull request Mar 3, 2022
#809 (comment)

I removed the `options.jsx === 'React.createElement'` thing as it's no longer relevant with `jsxFragmentFactory` (see #623 (comment)) and we set default values in the CLI for both `jsx` and `jsxFragment`, so we don't really need extra fallback values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(rpt2 plugin) semantic error TS2304: Cannot find name 'h'.
4 participants