title: Rails 5 don't precompile JS files with ES6 code in production
body: <p>I am deploying an app with some javascript that contain ES6 code.</p>
  
  <p>When I did run <code>bundle exec rake assets:precompile RAILS_ENV=production</code>, I got:</p>
  
  <pre><code>ExecJS::RuntimeError: SyntaxError: Unexpected token: punc ())
  </code></pre>
  
  <p>This is because prueba.js has the following:</p>
  
  <pre><code>var greetings = () =&gt; {
    let saludo = 'tio';
    console.log('saludo' + saludo)
  };
  greetings();
  </code></pre>
  
  <p>And Uglify don't recognize ES6. For fix this, I had installed and setting the gems:</p>
  
  <pre><code>gem 'sprockets-es6', '~&gt; 0.9.2'
  gem 'babel-transpiler', '~&gt; 0.7.0'
  </code></pre>
  
  <p>But isn't working, </p>
  
  <p>In application.rb, I have:</p>
  
  <pre><code>require "action_view/railtie"
  require "sprockets/railtie"
  # require "rails/test_unit/railtie"
  require 'sprockets/es6'
  </code></pre>
  
  <p>Note: If i run <code>rake assets:precompile</code> without RAILS_ENV=production, I don't get errors</p>