Use React with Gulp, Browserify and Babelify. This allows you to use React in jsx & node.js style.
It let's you use require('module')
in your JavaScript. Babelify will transform the jsx code to JavaScript code.
gulp build-react
This will generate a main.min.js
file in the build
directory with sourcemaps.
gulp build-react --production
This will exclude the sourcemaps and will minify your output file.