title: Transpiling ES6 for IE11 with Babel
body: <p>I'm new to babel and trying to transpile my es6 code to work with IE11.  But when I run the code in IE11 I get js errors about my <code>forEach</code> code.  From what I've read I needed to add the preset <code>@babel/preset-env</code>. I added that to my config file so I'm not sure why it's not transpiling those <code>forEach</code> calls.</p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
      entry: {
          setupForm: "./Scripts/es6/setupForm.js",
          prelimForm: "./Scripts/es6/prelimForm.js"
      },
      output: {
          filename: '[name].js',
          path: path.resolve(__dirname, './Scripts/build'),
      },
      module: {
          rules: [{
              loader: 'babel-loader',
              test: /\.js$/,
              exclude: /node_modules/,
              query: {
                  presets: ['@babel/preset-env']
              }
          }]
      }
  }
  </code></pre>
  
  <p>I thought that perhaps I needed to additionally reference the babel <code>polyfill.js</code> as <a href="https://babeljs.io/docs/en/babel-polyfill" rel="nofollow noreferrer">discussed here</a> so I added it to my page, however, I'm getting the same error about <strong>Object doesn't support property or method 'forEach'</strong>.</p>
  
  <p>Here is my package.json file.</p>
  
  <pre><code>{
    "name": "OurSite",
    "version": "1.0.0",
    "description": "",
    "main": "map_embed.js",
    "directories": {
      "doc": "docs"
    },
    "scripts": {
      "build": "webpack"
    },
    "keywords": [],
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "@babel/core": "^7.4.5",
      "@babel/preset-env": "^7.4.5",
      "babel-core": "^6.26.3",
      "babel-loader": "^8.0.6",
      "babel-polyfill": "^6.26.0",
      "babel-preset-env": "^1.7.0",
      "webpack": "^4.32.2",
      "webpack-cli": "^3.3.2"
    },
    "babel": {
      "presets": [
        "env"
      ]
    },
    "dependencies": {}
  }
  </code></pre>