My .js files are compressed and variables mangled, but function names are not mangled (running latest Rails 3.2.8 and latest uglify 1.3.0 gem) on Heroku.
According to https://github.com/lautis/uglifier#usage the "mangle" option defaults to true. Below is my config.
From production.rb:
config.assets.compress = true
config.assets.js_compressor = :uglifier
I've also tried
config.assets.compress = true
config.assets.js_compressor = Uglifier.new(:mangle => true, :toplevel => true, :copyright => true)
but with no noticable difference.
As one commenter suggested, I did try changing contents of one my .js files, but didn't make a difference.
Example from output of the compressed precompiled .js file on Heroku:
show_slideout_notification=function(){jQuery(".slideout_notification").slideDown();var e=$(".slideout_notification .countdown
Seems that variable names are mangled, but function names are not.
Any ideas why function names are not mangled? Or is this not wanted behaviour as it would then be difficult to call the functions from my Rails/js code (i.e. javascript onclick events). Or would those onclick calls be renamed to the mangled name too if the function names were mangled?
Thanks :-)