I need to run React in production mode, which presumably entails defining the following somewhere in the enviornment:
process.env.NODE_ENV = \'production\';
To set React in production mode you need to set your NODE_ENV variable to production and uglify your JS as an extra step.
You're already taking care of the uglification, for setting your NODE_ENV variable :
NODE_ENV='production' gulp
gulp.task('set-production-env', function() {
return process.env.NODE_ENV = 'production';
});