A Simple Build Process for React and JSX
First, we install these packages.
npm install browserify watchify babelify babel-preset-react --save-dev
Next, we add some configuration to our
Finally, we need to add some npm scripts so we can run this.
"build": "browserify index.js -o bundle.js",
"watch": "watchify index.js -vo bundle.js"
Now we are able to run
npm run watch and
npm run build. Watch will watch our files and run browserify on change. We use this while working. Build will run browserify. This is really only used by our build server.