Leon Revill Leon Revill - 11 months ago 86
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.

Answer Source

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