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, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/15544090.html
未经授权禁止转载,违者必究!