Leon Revill Leon Revill - 8 months ago 73
Javascript Question

How to minify (not transpile) ES2015 code with gulp

It appears that the popular

modules do not work with simply minifying ES2015 code and I cannot find any additional information through Google. I was hoping someone else has come up against this problem and has a solution?

Thank you.


Currently, the only way to minify ES2015 with gulp is to use gulp-babel which will transform ES2015 to "traditional" Javascript and then use gulp-uglify and gulp-minify.

Learn more at: gulp-babel