最近搜索


没有最近搜索

Importing ReactJS in iframe.html



已于 2022年1月21日 发布

I used ReactJS for frontend library, my problem is when I importing react js file "Display.js" classes in iframe.html like this "import Display from './Display';" it's not working. There is an error occurs says:

"Inline Babel script:3
Uncaught ReferenceError: require is not defined
at <anonymous>:5:18"

how to fix this? Thankyou in advance!


0

1

1 条评论

image avatar

Erica Girges

Zendesk Developer Advocacy

Hi KD!
 
Thank you for posting your question to the community. Just taking a look at the error you provided, it looks like you may have imported React from a CDN. If so, you would need to use a module bundler such as Webpack or Browserify. 
 
Hope this helps!
 
Best,
 
Erica - Dev Support

0


请先登录再写评论。

找不到所需的内容?

新建帖子