Similar to ChatMessage, we also assign the Chat component into module.exports so that we can load it from elsewhere. Make sure you do not put it // into production and make sure that you close and open your console if the // DEV-TOOLS does not display window.React = … Because we need access to ChatMessage, we require it next. React; Browserify; Babelify; Uglify; Vinyl Buffer; Gulp If; Yargs Note that this is much simpler than what we had before.
To get started, go ahead and install it: npm install -g beefy. messages: [] Using what I had experienced so far I built my own build process using the browserify , watchify and reactify npm modules. And I still could not get my sourcemapping to work. Other than this, the code is same as before. This makes it possible to install all saved dependencies with just npm install with no parameters. DOH!, what now? ReactDOM.render( Now recursively bundle up all the required modules starting at main.js into a single file called bundle.js with the browserify command: browserify main.js -o bundle.js Browserify parses the AST for require () calls to traverse the entire dependency graph of your project. Browserify will happily include whatever you require, no questions asked, so if you don’t want it, don’t require it…, You can also tell browerify to not include specified modules, using external, resp exclude options. By default, React includes many helpful warnings. You don’t have to require third party libraries. The -g flag makes npm install the package as global, meaning you get access to the browserify command from the command line. }, This is similar to Grunt or Gulp, but somewhat simpler. If you’re familiar with ES6 module imports, it works in a similar way.