DEV Community

sumit kumar
sumit kumar

Posted on

Using React 17 in the angular 11 gives the error React is not defined when makes prod build but working fine in dev build.

Hi I am following this URL to integrate React in angular https://medium.com/@zacky_14189/embedding-react-components-in-angular-the-easy-way-60f796b68aef

But when I make production build then in the browser console I got the error
main.597a58e09c20f4baf37b.js:1 ERROR ReferenceError: React is not defined
at e.render (14.30350cdd70a75b908595.js:1)
at e.ngAfterViewInit (14.30350cdd70a75b908595.js:1)
at Jt (main.597a58e09c20f4baf37b.js:1)
at $t (main.597a58e09c20f4baf37b.js:1)
at Zt (main.597a58e09c20f4baf37b.js:1)
at on (main.597a58e09c20f4baf37b.js:1)
at main.597a58e09c20f4baf37b.js:1
at on (main.597a58e09c20f4baf37b.js:1)
at Rn (main.597a58e09c20f4baf37b.js:1)
at main.597a58e09c20f4baf37b.js:1

Top comments (0)