5

I have a small form component built using React that I want to make into an embeddable widget for use on other pages. I believe I heard Babelify can help accomplish this, but I'm honestly drawing a blank on how to get this working. I used Babelify to create a bundle.js of the form component, but sticking that on to a blank HTML page using <script src='bundle.js'></script> didn't do anything. So clearly I am either misunderstanding something or am just...totally lost.

demluckycharms
  • 421
  • 1
  • 6
  • 17

1 Answers1

5

Created an embeddable widget with react by following this tutorial http://krasimirtsonev.com/blog/article/javascript-library-starter-using-webpack-es6

mouthzipper
  • 300
  • 4
  • 10
  • 1
    If its helpful, I created a fork of the repo in that article to be more react specific. https://github.com/johnpolacek/react-widget-library-starter – johnpolacek Nov 15 '18 at 01:18