Skip to content

TS: Fix Fragments broken when jsxFactory is set - #623

Merged
marvinhagemeister merged 1 commit into
masterfrom
fix-ts-jsx
May 20, 2020
Merged

marvinhagemeister merged 1 commit into
masterfrom
fix-ts-jsx

Conversation

@marvinhagemeister

@marvinhagemeister marvinhagemeister commented May 20, 2020 •

Copy link
Copy Markdown
Collaborator

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

@wardpeet wardpeet left a comment

Copy link
Copy Markdown
Collaborator

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

nojvek commented May 22, 2020

Copy link
Copy Markdown

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

@marvinhagemeister

Copy link
Copy Markdown
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

4 participants