I know this is old, but I got the same error, and I came here from Google, so if someone did this too, this was my decision:
I used this in the console to find the file and the error line (took this answer ):
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name))
end
, javascript ES6, . , , :
:
function foo(a, b = default_b) {
...
}
:
function foo(a, b) {
b = typeof b !== 'undefined' ? b : 'default_b';
...
}