lautis / uglifier

Ruby wrapper for UglifyJS JavaScript compressor.
http://www.rubydoc.info/gems/uglifier
MIT License
613 stars 82 forks source link

Error thrown is Function contains = in argument #100

Closed demonmind closed 8 years ago

demonmind commented 8 years ago

I have a function in javascript that contains = sign in arguments such as the one below

function(arg1=null, arg2=null){
....
}

I get this error

ExecJS::ProgramError: Unexpected token operator «=», expected punc «,»

Any help would be appriciated

lautis commented 8 years ago

UglifyJS currently has very limited support for ES6. mishoo/UglifyJS2#448 contains more information about the status.

It probably would make sense to clarify that Uglifier is due to the underlying library also a ES5 minifier.

demonmind commented 8 years ago

Fixed this by not using uglifyer and switching to Closure