title: Babel command line not transpiling import statements - React
body: <p>I have the following JSX file.</p>
  
  <pre><code>import React from "react";
  
  export default class Code extends React.Component {
      render() {
          return &lt;div&gt;&lt;/div&gt;
      }
  }
  
  React.render(&lt;Code /&gt;, document.getElementById('code'));
  </code></pre>
  
  <p>I'm running Babel from the command line using the following</p>
  
  <pre><code>babel --plugins transform-react-jsx app.jsx -d dist
  </code></pre>
  
  <p>I get the following output</p>
  
  <pre><code>import React from "react";
  export default class Code extends React.Component {
    render() {
      return React.createElement("div", null);
    }
  
  }
  React.render(React.createElement(Code, null), document.getElementById('code'));
  </code></pre>
  
  <p>This obviously does not run in the browser since import and export are not valid. What settings do I need to specify for Babel to transfrom es6 imports?</p>
  
  <p>Here is my .babelrc file</p>
  
  <pre><code>{
      "plugins": [
          [
              "transform-react-jsx",
              {
                  "pragma": "dom" // default pragma is React.createElement
              },
          ]
      ]
  }
  </code></pre>
  
  <p>Thanks</p>