Minify Es2017 With Gulp
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 workaroun
Solution 1:
I think that Uglify can't parse some ES2015 features, so you need to transpile those down to ES5 (es2017
targets Node 5+).
With these webpack instructions, specifically the presets and plugins, you should be able to get it working (at least it did for me, as I could replicate similar Uglify issues by just using es2017
):
presets: ['es2015', 'es2017', 'react'],
plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties']
Post a Comment for "Minify Es2017 With Gulp"