terinjokes/gulp-uglify

pipe finished { GulpUglifyError: unable to minify JavaScript } - Stream.js Unhandled Stream Error

Closed this issue · 3 comments

While Minifying,

Uglify encountered a closure that has parameter values initialized within the function definition.

Like So:

var myFunc = (function(){
       return function ( initialize = true, id = "space" ) {
               do  blah blah blah
       };
})

Using PumP,
I got this screenshot of the detailed traceback to the origin of the error
screenshot from 2017-03-14 14-46-33
which traces back to the line ,

return function ( initialize = true, id = "space" ) {

in my js file.

Why should this be an issue? I remove the parameter initializations, and uglify works fine.

Ah! Will you accommodate ES6 syntax any time soon? Thanks for the awesome plugin otherwise!

transform with babel before minifying