xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

tsc --jsx=react All In One

tsc --jsx=react All In One

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

error TS5023: Unknown compiler option '--jsx=react'.

solution

# ❌
$ tsc --jsx ./src/views/monitor/*.tsx
# error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'.

# ❌
$ tsc --jsx=react ./src/views/monitor/*.tsx
# error TS5023: Unknown compiler option '--jsx=react'.
# ❌
$ tsc --jsx='react' ./src/views/monitor/*.tsx 

# ✅
$ tsc --jsx react ./src/views/monitor/*.tsx
# ✅
$ tsc --jsx 'react' ./src/views/monitor/*.tsx

refs

https://blog.mgechev.com/2015/07/05/using-jsx-react-with-typescript/

https://www.typescriptlang.org/docs/handbook/jsx.html



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-11-12 13:09  xgqfrms  阅读(316)  评论(1编辑  收藏  举报