Cannot use JSX unless the '--jsx' flag is provided.

在tsx文件中加入html代码后,报错

Cannot use JSX unless the '--jsx' flag is provided.

解决方法:

在tsconfig.json中加入:

"jsx": "react",

 

posted @ 2019-11-10 15:02  朋克  阅读(7244)  评论(0)    收藏  举报