Hey guys I'm currently using uglify-gulp with babel to minify my js. And it works great with es2015 and es2016. But it breaks if I try to do es2017.
Does anyone know any workarounds to minify js that is using the new experimental features in es2017?
gulp.src('build/js/bundled/bundle.js')
.pipe(babel({
compact: false,
presets: ["es2017", "react"],
plugins: ["transform-decorators-legacy"],
}))
.pipe(uglify())
.pipe(gulp.dest('build/js/bundled'));
which generates this error
GulpUglifyError: unable to minify JavaScript
If I change es2017 to es2015/es2016 it will minify my bundles that don't have es2017 features just fine. But I want to be able to use those experimental features and be able to minify my code