首页 > 其他 > 详细

Cannot read property 'createElement' of undefined

时间:2019-11-28 00:55:17      阅读:113      评论:0      收藏:0      [点我收藏+]

场景:

  架构:React+TS+DVA

    具体场景: 在将之前后缀为jsx的组件转化为tsx后缀的组件时,抛出Cannot read property ‘createElement‘ of undefined

  技术分享图片

 解决方案:

  在tsconfig.json中添加配置

"esModuleInterop": true
"allowSyntheticDefaultImports": true

  作用:允许导入符合es6模块规范的CommonJS模块。

 

Cannot read property 'createElement' of undefined

原文:https://www.cnblogs.com/suihang/p/11946372.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!