I am new to babel.
I set it up like this:
.babelrc:
{
"presets": ["es2015", "es2017"]
}
gulpfile:
gulp.task('default', function() {
return gulp.src(['src/**/*.js', '!src/**/3rd/*'])
.pipe(babel())
.pipe(gulp.dest('dist'));
});
However this seems to be compiling to es5 which is not fully supported in Safari.
Is there a way to set target? So it can compile to ES3?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…