title: Why Babel does not convert a const to an unwritable property in a object?
body: <p>For studying purposes I'm testing es6 features and using babel to compile it to es5. Now I made a small example where I added a const to a file, and made babel compile it, then I went to check the result and I saw that it simply compiled it to a normal var which, of course, is writable.</p>
  
  <p>For completeness' sake, here is my .babelrc file:</p>
  
  <pre><code>{
      "presets": ["latest"]
  }
  </code></pre>
  
  <p>Here is my es6 file:</p>
  
  <pre><code>const SOME_WEIRD_CONSTANT = 'AbC123';
  console.log(SOME_WEIRD_CONSTANT);
  </code></pre>
  
  <p>And here is the output after running babel on it:</p>
  
  <pre><code>'use strict';
  
  var SOME_WEIRD_CONSTANT = 'AbC123';
  console.log(SOME_WEIRD_CONSTANT);
  </code></pre>
  
  <p>Babel's Try it Out online feature, <a href="https://babeljs.io/repl/#?babili=false&amp;evaluate=true&amp;lineWrap=false&amp;presets=es2015%2Cstage-2&amp;code=const%20SOME_WEIRD_CONSTANT%20%3D%20&#39;AbC123&#39;%3B%0Aconsole.log(SOME_WEIRD_CONSTANT)%3B" rel="nofollow noreferrer">gives the same result</a>.</p>