Leon Revill Leon Revill - 1 year ago 136
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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download