title: SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' - Gulp
body: <p>Consider the following two files:</p>
  
  <p><code>app.js</code></p>
  
  <pre><code>import Game       from './game/game';
  import React      from 'react';
  import ReactDOM   from 'react-dom';
  
  export default (absPath) =&gt; {
    let gameElement = document.getElementById("container");
  
    if (gameElement !== null) {
        ReactDOM.render(
            &lt;Game mainPath={absPath} /&gt;,
            gameElement
        );
    }
  }
  </code></pre>
  
  <p><code>index.js</code></p>
  
  <pre><code>import App from './src/app';
  </code></pre>
  
  <p>The <code>gulpfile.js</code></p>
  
  <pre><code>var gulp        = require('gulp');
  var source      = require('vinyl-source-stream');
  var browserify  = require('browserify');
  var babelify    = require("babelify");
  var watch       = require('gulp-watch');
  
  gulp.task('make:game', function(){
    return browserify({
      entries: [
        'index.js'
      ]
    })
    .transform('babelify')
    .bundle()
    .pipe(source('index.js'))
    .pipe(gulp.dest('app/'));
  });
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>gulp make:game
  [13:09:48] Using gulpfile ~/Documents/ice-cream/gulpfile.js
  [13:09:48] Starting 'make:game'...
  
  events.js:154
        throw er; // Unhandled 'error' event
        ^
  SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'
  </code></pre>
  
  <p><strong>What is this error? What am I doing wrong?</strong></p>