title: Cannot read property '_babelPolyfill' of undefined
body: <p>I'm trying to get babel-polyfill working with for a library but I'm getting the following error:</p>
  
  <pre><code>TypeError: Cannot read property '_babelPolyfill' of undefined
  at Object.&lt;anonymous&gt; (/Users/foo/webpack-library-starter/lib/library.js:73:6)
  ...
  </code></pre>
  
  <p>I'm using <a href="https://github.com/krasimir/webpack-library-starter" rel="nofollow noreferrer">webpack-library-starter</a> as my template.</p>
  
  <p><strong>Full replication details:</strong></p>
  
  <pre><code>git clone https://github.com/krasimir/webpack-library-starter.git
  cd webpack-library-starter
  npm i
  npm i --save babel-polyfill
  </code></pre>
  
  <p>Tried both adding <code>import 'babel-polyfill'</code> to the beginning of "src/index.js" and not having it.</p>
  
  <p>Add <code>'babel-polyfill'</code> to "webpack.config.js":</p>
  
  <pre><code>  entry: ['babel-polyfill', __dirname + '/src/index.js'],
  </code></pre>
  
  <p>Then build and test:</p>
  
  <pre><code>npm run dev
  npm run build
  npm test
  </code></pre>