title: SCRIPT5017 error on Internet Explorer 11, using webpack 4, babel 7 and react
body: <p>So I am working on a website that is using react. I have been testing it in different browsers, and right now the only browser not working is the terrible Internet Explorer. When the page loads on internet explorer it is just a blank/white screen. I have tried multiple suggestions like integrating browserlist, @babel/preset-env with no luck. I completely upgraded from babel 6 to babel 7 to see if that was the issue and nothing changed.</p>
  <p>Here are my Dependencies and Dev Dependencies:</p>
  <pre><code>[
  &quot;dependencies&quot;: {
    &quot;@babel/plugin-transform-modules-commonjs&quot;: &quot;^7.10.4&quot;,
    &quot;@babel/polyfill&quot;: &quot;^7.10.4&quot;,
    &quot;@babel/preset-es2015&quot;: &quot;^7.0.0-beta.53&quot;,
    &quot;@stripe/react-stripe-js&quot;: &quot;^1.1.2&quot;,
    &quot;@stripe/stripe-js&quot;: &quot;^1.8.0&quot;,
    &quot;@tinymce/tinymce-react&quot;: &quot;^3.6.0&quot;,
    &quot;axios&quot;: &quot;^0.19.2&quot;,
    &quot;babel-preset-react&quot;: &quot;^6.24.1&quot;,
    &quot;bootstrap&quot;: &quot;^4.4.1&quot;,
    &quot;browser-image-compression&quot;: &quot;^1.0.11&quot;,
    &quot;browserslist&quot;: &quot;^4.13.0&quot;,
    &quot;core-js&quot;: &quot;3.6.5&quot;,
    &quot;crypto-js&quot;: &quot;^4.0.0&quot;,
    &quot;emotion&quot;: &quot;^10.0.27&quot;,
    &quot;eslint-plugin-promise&quot;: &quot;^4.2.1&quot;,
    &quot;file-system&quot;: &quot;^2.2.2&quot;,
    &quot;firebase&quot;: &quot;^7.14.5&quot;,
    &quot;firebase-functions&quot;: &quot;^3.6.2&quot;,
    &quot;fuse.js&quot;: &quot;^6.4.0&quot;,
    &quot;google-map-react&quot;: &quot;^1.1.7&quot;,
    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
    &quot;img-loader&quot;: &quot;^3.0.1&quot;,
    &quot;jest&quot;: &quot;^25.2.4&quot;,
    &quot;jquery&quot;: &quot;^3.5.1&quot;,
    &quot;mdbreact&quot;: &quot;^4.26.0&quot;,
    &quot;moment&quot;: &quot;^2.24.0&quot;,
    &quot;net&quot;: &quot;^1.0.2&quot;,
    &quot;photoeditorsdk&quot;: &quot;^5.0.0&quot;,
    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
    &quot;react&quot;: &quot;^16.13.1&quot;,
    &quot;react-app-polyfill&quot;: &quot;^1.0.6&quot;,
    &quot;react-bootstrap&quot;: &quot;^1.0.1&quot;,
    &quot;react-cookie-consent&quot;: &quot;^5.0.0&quot;,
    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
    &quot;react-drag-sortable&quot;: &quot;^1.0.6&quot;,
    &quot;react-dropzone&quot;: &quot;^10.2.2&quot;,
    &quot;react-facebook&quot;: &quot;^8.1.4&quot;,
    &quot;react-helmet&quot;: &quot;^6.0.0&quot;,
    &quot;react-icons&quot;: &quot;^3.9.0&quot;,
    &quot;react-json-tree&quot;: &quot;^0.11.2&quot;,
    &quot;react-lazyload&quot;: &quot;^3.0.0&quot;,
    &quot;react-phone-input-2&quot;: &quot;^2.13.7&quot;,
    &quot;react-places-autocomplete&quot;: &quot;^7.2.1&quot;,
    &quot;react-redux&quot;: &quot;^7.2.0&quot;,
    &quot;react-router-dom&quot;: &quot;^5.1.2&quot;,
    &quot;react-router-guards&quot;: &quot;^1.0.2&quot;,
    &quot;react-social-icons&quot;: &quot;^4.1.0&quot;,
    &quot;react-stripe-checkout&quot;: &quot;^2.6.3&quot;,
    &quot;reactstrap&quot;: &quot;^8.5.1&quot;,
    &quot;redux&quot;: &quot;^4.0.5&quot;,
    &quot;rxjs&quot;: &quot;^6.5.4&quot;,
    &quot;stripe&quot;: &quot;^8.76.0&quot;,
    &quot;styled-components&quot;: &quot;^4.4.1&quot;,
    &quot;styled-jsx&quot;: &quot;^3.2.5&quot;,
    &quot;unirest&quot;: &quot;^0.6.0&quot;,
    &quot;url-polyfill&quot;: &quot;^1.1.10&quot;,
    &quot;uuidv4&quot;: &quot;^6.0.7&quot;,
    &quot;webworkify-webpack&quot;: &quot;^2.1.5&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@babel/cli&quot;: &quot;^7.8.4&quot;,
    &quot;@babel/core&quot;: &quot;^7.9.6&quot;,
    &quot;@babel/plugin-proposal-class-properties&quot;: &quot;^7.8.3&quot;,
    &quot;@babel/plugin-proposal-decorators&quot;: &quot;^7.10.5&quot;,
    &quot;@babel/plugin-transform-runtime&quot;: &quot;^7.10.5&quot;,
    &quot;@babel/preset-env&quot;: &quot;^7.10.4&quot;,
    &quot;@babel/preset-react&quot;: &quot;^7.9.4&quot;,
    &quot;babel-core&quot;: &quot;^6.26.3&quot;,
    &quot;babel-eslint&quot;: &quot;^10.1.0&quot;,
    &quot;babel-jest&quot;: &quot;^25.2.4&quot;,
    &quot;babel-loader&quot;: &quot;^8.1.0&quot;,
    &quot;babel-minify-webpack-plugin&quot;: &quot;^0.3.1&quot;,
    &quot;babel-plugin-syntax-async-functions&quot;: &quot;^6.13.0&quot;,
    &quot;babel-plugin-transform-es2015-modules-commonjs&quot;: &quot;^6.26.2&quot;,
    &quot;babel-preset-es2015&quot;: &quot;^6.24.1&quot;,
    &quot;clean-webpack-plugin&quot;: &quot;^3.0.0&quot;,
    &quot;compression-webpack-plugin&quot;: &quot;^4.0.0&quot;,
    &quot;copy-webpack-plugin&quot;: &quot;^5.1.1&quot;,
    &quot;css-loader&quot;: &quot;^3.5.3&quot;,
    &quot;dotenv-webpack&quot;: &quot;^1.7.0&quot;,
    &quot;eslint&quot;: &quot;^6.8.0&quot;,
    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
    &quot;eslint-loader&quot;: &quot;^4.0.2&quot;,
    &quot;eslint-plugin-import&quot;: &quot;^2.20.2&quot;,
    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
    &quot;eslint-plugin-react&quot;: &quot;^7.19.0&quot;,
    &quot;file-loader&quot;: &quot;^6.0.0&quot;,
    &quot;html-loader&quot;: &quot;^1.1.0&quot;,
    &quot;html-webpack-plugin&quot;: &quot;^4.3.0&quot;,
    &quot;inspectpack&quot;: &quot;^4.5.2&quot;,
    &quot;json-loader&quot;: &quot;^0.5.7&quot;,
    &quot;mini-css-extract-plugin&quot;: &quot;^0.9.0&quot;,
    &quot;node-sass&quot;: &quot;^4.14.1&quot;,
    &quot;prettier&quot;: &quot;^2.0.4&quot;,
    &quot;react-hot-loader&quot;: &quot;^4.12.20&quot;,
    &quot;sass&quot;: &quot;^1.26.10&quot;,
    &quot;sass-lint&quot;: &quot;^1.13.1&quot;,
    &quot;sass-loader&quot;: &quot;^8.0.2&quot;,
    &quot;style-loader&quot;: &quot;^1.2.1&quot;,
    &quot;terser-webpack-plugin&quot;: &quot;^3.0.2&quot;,
    &quot;uglifyjs-webpack-plugin&quot;: &quot;^2.2.0&quot;,
    &quot;url-loader&quot;: &quot;^0.6.2&quot;,
    &quot;webpack&quot;: &quot;^4.43.0&quot;,
    &quot;webpack-cli&quot;: &quot;^3.3.11&quot;,
    &quot;webpack-dev-server&quot;: &quot;^3.10.3&quot;,
    &quot;worker-loader&quot;: &quot;^2.0.0&quot;
  }
  </code></pre>
  <p>]</p>
  <p>Here is some of my webpack.config.js:</p>
  <pre><code>module: {
  rules: [
    {
      test: /\.css$/i,
      use: ['style-loader', 'css-loader', 'sass-loader']
    },
    {
      test: /\.(jpe?g|png|gif|svg|webp)$/i,
      loaders: [
        {
          loader: 'file-loader',
          options: {
            name: '[path][name].[ext]'
          }
        },
        {
          loader: 'img-loader',
        }
      ]
    },
    {
      test: /\.jsx?$/,
      enforce: &quot;pre&quot;,
      loader: &quot;eslint-loader&quot;,
      exclude: /node_modules/,
      options: {
        emitWarning: true,
        configFile: &quot;./.eslintrc.json&quot;
      }
    },
    {
      test: /\.s[ac]ss$/i,
      use: [
        'style-loader',
        'css-loader',
        'sass-loader',
      ],
    },
    {
      test: /\.(jsx|js)?$/,
      loader: &quot;babel-loader&quot;,
      exclude: /node_modules/,
    }
  ]
  </code></pre>
  <p>},</p>
  <p>EDIT:
  I forgot to add my babel.config.js</p>
  <pre><code>module.exports = {
  &quot;presets&quot;: [[
      &quot;@babel/preset-env&quot;,
      {
          &quot;corejs&quot;: { &quot;version&quot;: 3 },
          &quot;useBuiltIns&quot;: &quot;usage&quot;,
          &quot;targets&quot;: {
              &quot;edge&quot;: &quot;17&quot;,
              &quot;firefox&quot;: &quot;60&quot;,
              &quot;chrome&quot;: &quot;67&quot;,
              &quot;safari&quot;: &quot;11.1&quot;,
              &quot;ie&quot;: &quot;11&quot;,
              &quot;browsers&quot;: [
                  &quot;Chrome &gt;= 59&quot;,
                  &quot;FireFox &gt;= 44&quot;,
                  &quot;Safari &gt;= 7&quot;,
                  &quot;Explorer 11&quot;,
                  &quot;ie 11&quot;,
                  &quot;last 4 Edge versions&quot;
              ]
          }
      }
  ], &quot;@babel/preset-react&quot;],
  &quot;plugins&quot;: [[&quot;@babel/plugin-proposal-class-properties&quot;], [&quot;syntax-async-functions&quot;], [&quot;emotion&quot;], [&quot;@babel/plugin-proposal-decorators&quot;, { &quot;decoratorsBeforeExport&quot;: true }], [&quot;@babel/transform-runtime&quot;]]
  </code></pre>
  <p>}</p>
  <p>Here is the error I am getting in Internet Explorer 11:<a href="https://i.stack.imgur.com/7QTYd.png" rel="nofollow noreferrer">SCRIPT5017</a></p>