After reviewing compatibility tables, like the one found at , it appears that Chrome is on the verge of fully supporting ES6. This leads me to believe that I can omit certain elements during development.
var babelifyOptions = {
presets: ['es2015', 'stage-0', 'react'],
extensions: ['.js', '.jsx']
};
For instance, when using browserify:
browserify(browserifyOptions)
.transform(babelify.configure(babelifyOptions))
.bundle()
.pipe(source('app.js'))
.pipe(buffer())
.pipe(gulp.dest('./dist/js'));
This adjustment should help expedite build times. Of course, transpilation will still be necessary for production builds.
However, by removing the es2015 presets, issues arise with browserify struggling to comprehend syntax such as ...
. While this is understandable, is there a way to configure browserify to target only Chrome? (Allowing for features supported by Chrome while excluding those not yet recognized by other browsers).