美文网首页
React' refers to a UMD global, b

React' refers to a UMD global, b

作者: 多记录多学习 | 来源:发表于2022-08-06 17:33 被阅读0次

使用typescript+react+webpack 启用项目的时候报错
React' refers to a UMD global, but the current file is a module. Consider adding an import instead

修改tsconfig.json的配置选项

 "compilerOptions": {
     "jsx": "react-jsx",   
  }

相关文章

网友评论

      本文标题:React' refers to a UMD global, b

      本文链接:https://www.haomeiwen.com/subject/jpabwrtx.html