title: Javascript broken in IE11 and old browsers - node+react+webpack production build
body: <p>On just about every browser, Javascript appears to be working fine. However, with some older browsers and IE11, it appears broken.</p>
  
  <p>I suspect this is the case because when submitting a form <code>event.preventDefault()</code> isn't firing. And another function isn't being called. However React router seems to work correctly. I'm also using jQuery (yes I know) which doesn't seem to work either when I try to run console commands.</p>
  
  <p>Here is my Webpack config:</p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  
  var config = {
    devtool: 'cheap-module-eval-source-map',
    entry: [
      'webpack-hot-middleware/client',
      './app/main'
    ],
    output: {
      path: path.join(__dirname, 'public', 'js'),
      filename: 'bundle.js',
      publicPath: '/js'
    },
    plugins: [
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NoErrorsPlugin(),
      new webpack.optimize.OccurenceOrderPlugin(),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
      })
    ],
    module: {
      loaders: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
          query: {
            plugins: [
              ['react-transform', {
                transforms: [
                  {
                    transform: 'react-transform-hmr',
                    imports: ['react'],
                    locals: ['module']
                  }, {
                    transform: 'react-transform-catch-errors',
                    imports: ['react', 'redbox-react']
                  }
                ]
              }]
            ]
          }
        }
      ]
    }
  };
  
  if (process.env.NODE_ENV === 'production') {
    config.plugins.push(
      new webpack.optimize.UglifyJsPlugin({
        compressor: {
          screw_ie8: true,
          warnings: false
        }
      })
    );
  }
  
  module.exports = config;
  </code></pre>
  
  <p>What I'm importing in my main file:</p>
  
  <pre><code>import React from 'react';
  import { connect } from 'react-redux'
  import { Link } from 'react-router';
  import { betaRequest } from '../actions/auth'
  import Messages from './Messages'
  import $ from 'jquery'
  </code></pre>
  
  <p>I'm also (unfortunately) using Jade for the "root" file:</p>
  
  <pre><code>doctype html
  html
    head
      meta(charset='utf-8')
      meta(http-equiv='x-ua-compatible', content='ie=edge')
      meta(name='viewport', content='width=device-width, initial-scale=1')
      title='...'
      link(rel='stylesheet', href='/css/main.css')
      link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Bungee+Shade')
    body
      #app!= html
      script.
      window.INITIAL_STATE = !{JSON.stringify(initialState)}
  
      script(src='/js/lib/jquery.js')
      script(src='/js/lib/bootstrap.js')
      script(src='/js/bundle.js')
  
      // Google Analytics: change UA-XXXXX-X to be your site's ID.
      script.
        (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
        function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
        e=o.createElement(i);r=o.getElementsByTagName(i)[0];
        e.src='https://www.google-analytics.com/analytics.js';
        r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
        ga('create','...','auto');ga('send','pageview');
  </code></pre>
  
  <p>Function for submitting form:</p>
  
  <pre><code>  handleSignup(event) {
      event.preventDefault();
      this.props.dispatch(submit(this.state.name, this.state.email));
  
    }
  </code></pre>
  
  <p>Also not working in production:</p>
  
  <pre><code>  jumpToPlaceOnPage() {
      $('html,body').animate({
            scrollTop: document.getElementById("requestBetaSection").offsetTop
          }, 800);
    }
  </code></pre>
  
  <p>Getting the following error:
  <code>(index):1 EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.</code></p>