Uses the browserify JavaScript bundler and applies the babelify "transform", which runs the babel transpiler on the source code, transpiling JSX and ES6 to ES5 JavaScript.
Commands:
yarnornpm installinstalls the dependencies.npm startis the development target. This builds and serves the app using budo, which hot reloads when you save changes to the source code.npm run buildis the build target. It builds a singledist-bundle.jsJavaScript file containing the transpiled version of your code plus code from all dependent modules.
Remarks:
- The generated
dist-bundle.jscan be loaded into a browser using an HTML script element. - You can open the generated
dist-bundle.jsin a text editor and inspect what code has been included. - In a real application you would likely want to add things like unit tests, a minification step etc to the production build step etc. These steps have been omitted here in order to keep the example as simple as possible.
