title: Fetch Polyfill (whatwg-fetch) throws 'WebpackError: self is not defined'
body: <p>Added whatwg-fetch to my Gatsby project <code>yarn add  whatwg-fetch</code>, but it no longer builds. </p>
  
  <p>Instead, I receive the following error:</p>
  
  <blockquote>
    <p>ERROR #95313 </p>
    
    <p>Building static HTML failed</p>
    
    <p>WebpackError: ReferenceError: self is not defined</p>
    
    <p>fetch.umd.js:8 
     node_modules/whatwg-fetch/dist/fetch.umd.js:8:1</p>
    
    <p>fetch.umd.js:2 
     node_modules/whatwg-fetch/dist/fetch.umd.js:2:63</p>
    
    <p>fetch.umd.js:5 Object../node_modules/whatwg-fetch/dist/fetch.umd.js
     node_modules/whatwg-fetch/dist/fetch.umd.js:5:2</p>
    
    <p>provider.js:1 Module../src/store/provider.js
      src/store/provider.js:1:1</p>
    
    <p>gatsby-ssr.js:1 Module../gatsby-ssr.js
      gatsby-ssr.js:1:1></p>
  </blockquote>