title: Babelify ParseError 'import' and 'export' may appear only with 'sourceType: module'
body: <p>I'm trying to build a project with this simple structure:</p>
  
  <pre><code>app
   |-- components
   |       |-- App.jsx
   |       |-- Root.jsx
   |-- index.jsx
  </code></pre>
  
  <p><code>index.jsx</code> looks like this:</p>
  
  <pre><code>import React from 'react';
  import { createStore } from 'redux';
  import { render } from 'react-dom';
  
  import Root from 'app/components/core/Root';
  
  const store = createStore();
  
  render(&lt;Root store={ store } /&gt;, document.getElementById('root'));
  </code></pre>
  
  <p>and <code>Root.jsx</code> looks like this:</p>
  
  <pre><code>import React from 'react';
  import { Provider } from 'react-redux';
  import { BrowserRouter, Route } from 'react-router-dom';
  
  import App from 'app/components/core/App';
  
  const Root = ({ store }) =&gt; {
      return &lt;Provider store={ store }&gt;
          &lt;BrowserRouter&gt;
              &lt;Route path='/' component={ App } /&gt;
          &lt;/BrowserRouter&gt;
      &lt;/Provider&gt;
  };
  
  Root.propTypes = {
      store: React.PropTypes.object.isRequired,
  };
  
  export default Root;
  </code></pre>
  
  <p>I create a gulp file this way, specifying the (I think) correct processors for Babelify:</p>
  
  <pre><code>var gulp = require('gulp'),
  buffer = require('vinyl-buffer'),
  browserify = require('browserify'),
  babelify = require('babelify'),
  source = require('vinyl-source-stream'),
  gutil = require('gulp-util');
  
  
  gulp.task('build', function () {
      var browserifyOptions = {
          debug: true,
          entries: './app/index.jsx',
          extensions: ['.jsx', '.js'],
      };
  
      return browserify(browserifyOptions)
          .transform(babelify.configure({
              presets: ['es2015', 'react']
          }))
          .bundle()
          .on('error', gutil.log)
          .pipe(source('app.js'))
          .pipe(buffer())
          .pipe(gulp.dest('./lima/static'));
  });
  
  gulp.task('default', ['build']);
  </code></pre>
  
  <p>Now the strange thing is I get this:</p>
  
  <pre><code>Root.jsx:1
  import React from 'react';
  ^
  ParseError: 'import' and 'export' may appear only with 'sourceType: module'
  </code></pre>
  
  <p>The weird thing is that <code>index.jsx</code> seems to work just fine and if I remove any of the babel <code>presets</code> I get errors in that file instead. What can be wrong about <code>Root.jsx</code> or my <code>gulpfile</code>? </p>