title: Illegal import declaration with gulp-react
body: <p>I'm trying to introduce React with ES6 into my app, which is built with Gulp.  I can get React working alone, and ES6 working alone.  But trying to <code>import</code> crashes my Gulp build.  Gulp's error is:</p>
  
  <blockquote>
    <p>Line 14: Illegal import declaration</p>
  </blockquote>
  
  <p>My HTML page includes React and the built JS file:</p>
  
  <pre><code>    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/app.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p><code>app.js</code> looks like this:</p>
  
  <pre><code>import {Child} from './child.js';
  
  var Parent = React.createClass({
    render: function(){
      const y = 3;  //es6 works
      return (
        &lt;div&gt;
          &lt;div&gt; This is the parent {y}. &lt;/div&gt;
          &lt;Child name="child"/&gt;
        &lt;/div&gt;
      )
    }
  });
  
  React.render(&lt;Parent /&gt;, document.getElementById('container'));
  </code></pre>
  
  <p><code>child.js</code> is in the same directory and looks like this:</p>
  
  <pre><code>var Child = React.createClass({
    render: function(){
      return (
        &lt;div&gt;
          and this is the &lt;b&gt;{this.props.name}&lt;/b&gt;.
        &lt;/div&gt;
      )
    }
  });
  
  export default Child;
  </code></pre>
  
  <p>The part of my Gulp file that compiles ES6 with Babel:</p>
  
  <pre><code>gulp.task('babel', function(){
    gulp.src('js/app.js')
      .pipe(react())
      .pipe(babel({
        presets: ['es2015']
      }))
      .pipe(gulp.dest('dist/js'));
  });
  </code></pre>
  
  <p>What am I missing/doing wrong that is preventing me from using <code>import</code>? </p>