lautis / uglifier

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

Error while trying to minify JS (with Rails) #89

Closed andreynering closed 8 years ago

andreynering commented 8 years ago

This is a cross post from https://github.com/rails/sprockets/issues/187

This is the output message from the Rails task (rake assets:precompile): https://gist.githubusercontent.com/andreynering/123b60cb81e3a1c97dab/raw/bf7bad49c719e90231e6eafb91879d9ba25a58e3/output.txt

Unfortunately, I don't know how to reproduce it. But I think it should work, because the non-minified JS run without problems on both Chrome and Firefox.

tabaliov commented 8 years ago

Yep same problem here.

andreynering commented 8 years ago

I have a doubt: Is uglifier prepared to minify ES6?

Em sáb, 12 de dez de 2015 06:32, tabaliov notifications@github.com escreveu:

Yep same problem here.

— Reply to this email directly or view it on GitHub https://github.com/lautis/uglifier/issues/89#issuecomment-164125505.

tabaliov commented 8 years ago

Error i got was because of accidental ES6. i had functionName : (){} instead of functionName: functon(){} no JS error in chrome but unable to compile.

lautis commented 8 years ago

ES6 would explain this. UglifyJS doesn't support ES6 syntax at least yet.

andreynering commented 8 years ago

Closing. See https://github.com/rails/sprockets/issues/187#issuecomment-164411210