Closed pradella closed 2 years ago
react-jsx
is only supported by TS 4.1+, so this is due to TSDX using TS v3.
As such, this is duplicative of #926 , and the workarounds there using Yarn resolutions
(or NPM overrides
) to upgrade TS (and other deps) will work to enable the react-jsx
config as well.
Sharing my workaround for those who are struggling to fix compiler errors when using
react-jsx
in yourtsconfig.json
.
Appreciate you sharing another workaround in the meantime though for other users who were stuck!
Hi everyone
Sharing my workaround for those who are struggling to fix compiler errors when using
react-jsx
in yourtsconfig.json
.In my case, the error was:
'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.ts(2686)
.Solution: in
tsconfig.json
, changereact-jsx
topreserve
, as replied in another issue:If possible in a near future, add support for
react-jsx
.