Monday, 15 October 2018

Bundle external JavaScript(from a cdn) into a React component

What options are there to bundle an external javascript sdk into a React Component?

I have tried including the javascript in the index.html and referring to it through window.xyz . It works well but I can't do a production build since the javascript is not packaged in this way.

Is there a way to simply import a javascript file into the React Component definition?

PS: React Newbie here !



from Bundle external JavaScript(from a cdn) into a React component

No comments:

Post a Comment