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

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

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

解决方法:

在tsconfig.json中加入:

"jsx": "react",
原文地址:https://www.cnblogs.com/punkrocker/p/11830243.html