title: How to transpile harmony for server side react rails
body: <p>I am using <code>react-rails</code>, and I'm trying to render server side using the <code>prerender</code> option:</p>
  
  <pre><code>&lt;%= react_component('MyComponent', @data, {prerender: true}) %&gt;
  </code></pre>
  
  <p>When I do this, I get an error as a result of <code>const</code>:</p>
  
  <pre><code>Exception: SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.
  </code></pre>
  
  <p>The <code>const</code> keyword, IIUC, is available in ES6, so it needs to be transpiled in some way. I'm trying to figure out how to tell react-rails to transpile the ES6. It seems like <code>config.react.jsx_transform_options</code> is the way to specify, it, but I've added the following to application.rb and it does not have any effect:</p>
  
  <p>application.rb:</p>
  
  <pre><code>config.react.jsx_transform_options = {
    whitelist: [
      "es6.constants",
    ],
  }
  </code></pre>
  
  <p>What am I doing wrong here?</p>