title: SCRIPT1002: Syntax error in IE11 with React + Babel + Webpack
body: <p>I'm trying to get my React App with ES2015 functionalities running in IE >= 11 using Webpack + Babel. The setup is custom, using the <code>inferno-compat</code> layer, so no <code>create-react-app</code> used here. </p>
  
  <p>However - despite applying the latest <code>babel-polyfill</code> and <code>babel-preset-env</code> practices to my <code>.babelrc</code> and webpack config, I still get a <strong>SCRIPT1002: Syntax error</strong> within my bundle.js when trying to access the app with IE11.</p>
  
  <p>When I follow the syntax error reference in IEs console, this is the part within the generated bundle.js that's conflicting (the arrow-function in particular):</p>
  
  <pre><code>function add(x, y) {
    if (y === undefined) {
      return yHolder =&gt; add(x, yHolder);
    }
  
    return x + y;
  }
  </code></pre>
  
  <p>These are the relevant dependencies within my <code>package.json</code>:</p>
  
  <pre><code>"dependencies": {
    "inferno-redux": "^3.10.1",
    "react": "^15.6.0",
    "react-dom": "^15.6.0",
    "react-ga": "^2.2.0",
    "react-swipeable": "^4.1.0",
    "redux": "^3.7.2",
    "redux-saga": "^0.16.0",
    "regenerator-runtime": "^0.11.0"
  },
  "devDependencies": {
    //... stuff
  
    "babel-cli": "^6.26.0",
    "babel-core": "^6.25.0",
    "babel-eslint": "^7.2.3",
    "babel-loader": "^7.1.1",
    "babel-plugin-inferno": "^3.2.0",
    "babel-plugin-module-resolver": "^2.7.1",
    "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
    "babel-plugin-transform-es2015-spread": "^6.22.0",
    "babel-plugin-transform-regenerator": "^6.26.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-polyfill": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-flow": "^6.23.0",
    "babel-preset-react": "^6.24.1",
  
    //... some more stuff
  
    "webpack": "^3.8.1",
    "webpack-bundle-analyzer": "^2.9.1",
    "webpack-dev-middleware": "^1.12.2",
    "webpack-dev-server": "^2.9.5",
    "webpack-manifest-plugin": "^1.3.2",
    "webpack-merge": "^4.1.1",
  }
  </code></pre>
  
  <p>This is my <code>.babelrc</code>:</p>
  
  <pre><code>{
    "presets": 
      [
      "react", 
      "flow",
      "es2015",
      [
        "env", { 
          "modules": "commonjs",
          "targets": {
            "browsers": ["last 2 versions", "ie &gt;= 11"]
          }
        }
      ]
    ]
  }
  </code></pre>
  
  <p>I include the <code>babel-polyfill</code> within my <code>webpack.base.config.js</code> here:</p>
  
  <pre><code>// ... stuff
  entry: {
    index: ['babel-polyfill', './index.js'],
  },
  // ... more stuff
  </code></pre>
  
  <p>Any ideas what's missing to get it running in IE11?</p>