Need to bundle files that use ES2015 modules? babelify is a Browserify transform: it transpiles each file before Browserify processes it. Babel handles the translation; Browserify handles bundling the modules. section 3.4
Configure Babel in a .babelrc file, then tell Browserify to use babelify. Set an entry file that imports your modules and choose an output path for the bundle. section 3.5
$ browserify src/index.js --transform babelify --outfile dist/bundle.js --debug
This command uses src/index.js as the entry point, applies babelify, and writes the bundle to dist/bundle.js. The --debug flag includes source maps. section 3.5
The setup demonstrates an app module exporting an object and an entry file importing it. Babel CLI is not needed for this Browserify-and-babelify workflow. section 3.5
