Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

microbundle doesn't support TS 4.1 react-jsx config #255

Closed
thebiltheory opened this issue Dec 17, 2020 · 3 comments
Closed

microbundle doesn't support TS 4.1 react-jsx config #255

thebiltheory opened this issue Dec 17, 2020 · 3 comments
Labels
problem: needs more info This issue needs more information in order to handle it problem: stale Issue has not been responded to in some time scope: dependencies Issues or PRs about updating a dependency scope: downstream Issue in a downstream library, not in this library itself solution: can't repro An attempt to reproduce has been tried and failed topic: TS version Related to a change in a TS version

Comments

@thebiltheory
Copy link

thebiltheory commented Dec 17, 2020

React 17 ships with a new JSX transform which causes errors during the compilation with Microbundle.
For those who upgraded, react-scripts changes automatically your tsconfig to jsx: 'react-jsx' which isn't yet supported by this plugin.

See developit/microbundle#763

Is there any plan yet to upgrade this plugin to version 4.1?
See https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#jsx-factories

@ezolenko
Copy link
Owner

The plugin itself builds fine with ts 4.1, looks like there is something happening with jsx option?

Could you set plugin verbosity to 3 and post the output (it will print out parsed tsconfig and versions of related apps)

@johngarcia9110
Copy link

I am also getting this error.

rpt2: config error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.

@ezolenko ezolenko added the problem: needs more info This issue needs more information in order to handle it label Jan 20, 2021
@agilgur5 agilgur5 added scope: dependencies Issues or PRs about updating a dependency solution: can't repro An attempt to reproduce has been tried and failed topic: TS version Related to a change in a TS version scope: downstream Issue in a downstream library, not in this library itself labels Apr 23, 2022
@agilgur5 agilgur5 changed the title Upgrade typescript version to 4.1 microbundle doesn't support TS 4.1 react-jsx config Apr 30, 2022
@agilgur5 agilgur5 added the problem: stale Issue has not been responded to in some time label Apr 30, 2022
@agilgur5
Copy link
Collaborator

Per developit/microbundle#763 (comment) microbundle maintainers stated it was indeed on their side and that they had erroneously pointed at rpt2 before.
rpt2 does not pin a TS version and just lists it as a peerDep, so when using rpt2 directly, it should use the same TS version you have installed.

developit/microbundle#741 changed their TS import resolution a bit to try to grab the TS you have installed as well.

In any case, the issue was downstream in microbundle, and not here. As such, will be closing due to that as well as the fact that OP had not responded to further requests for comment.

If you believe this is still an issue, please provide a minimal reproduction with rpt2's latest version showing this issue either here or in a new issue for us to investigate.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
problem: needs more info This issue needs more information in order to handle it problem: stale Issue has not been responded to in some time scope: dependencies Issues or PRs about updating a dependency scope: downstream Issue in a downstream library, not in this library itself solution: can't repro An attempt to reproduce has been tried and failed topic: TS version Related to a change in a TS version
Projects
None yet
Development

No branches or pull requests

4 participants