Reputation: 11389
All:
When I followed the tutorial of Facebook React, it only talked about how to transpile with Babel, but no content with browserify, I wonder if I use gulp, how to build the work flow with babel and browserify.
For example:
That is it! Thanks
Upvotes: 1
Views: 318
Reputation: 26787
You could do that, or compile and browserify in the same step with the babelify transform for browserify.
Here is a basic example of how to compile and bundle modules in one step using babelify, and assuming an entry file that has a dependency graph that includes all of the modules you want to bundle.
browserify('./js/entry')
.transform(babelify)
.bundle()
.pipe(fs.createWriteStream('./dist/bundle.js'));
Upvotes: 1