title: How do I make my React app work on Edge and IE 11?
body: <p>My react has been working fine, but I decided to try it on Edge and Chrome and on both browsers I get a syntax error when it loads. The app was written using create-react-app, and when I discovered it wasn't working on Windows, I did the following:</p>
  
  <ul>
  <li>Installed <code>react-app-polyfill</code></li>
  <li>Updated my browser list in <code>package.json</code> to include <code>ie 11</code> and <code>last 1 edge</code></li>
  <li>imported <code>react-app-polyfill/stable</code> and <code>react-app-polyfill/ie11</code> in <code>index.js</code></li>
  <li>Deleted <code>node_modules/.cache</code></li>
  </ul>
  
  <p>and restarted <code>npm start</code> but both Edge and IE 11 dev tools console show syntax errors:
  <a href="https://i.stack.imgur.com/thz8R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/thz8R.png" alt="IE 11 syntax error"></a>
  but they show different line numbers for some odd reason. In desperation, I also tried deleting all of <code>node_modules</code> and running <code>npm install</code> again. Still no help.</p>
  
  <p>If I do a production build and serve, some pages seem to work and others I get errors in IE and Edge complaining about trying to do <code>map</code> or <code>length</code> on nulls.</p>