Recent searches


No recent searches

Importing ReactJS in iframe.html



Posted Jan 21, 2022

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 comment

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


Please sign in to leave a comment.

Didn't find what you're looking for?

New post