title: Webpack 2: static-site-generator-plugin "self is not defined"
body: <p>I've some problem with <a href="https://github.com/markdalgleish/static-site-generator-webpack-plugin" rel="noreferrer">static-site-generator-webpack-plugin</a>.</p>
  
  <p>In my project I'm using:</p>
  
  <ul>
  <li><strong>webpack</strong> v2.1.0-beta.27</li>
  <li><strong>static-site-generator-webpack-plugin</strong> v3.1.0</li>
  <li><strong>react</strong> and <strong>react-dom</strong> v15.4.1</li>
  </ul>
  
  <p>It's a single page website.</p>
  
  <p>Here is a part of <code>webpack.config.babel.js</code> file:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import StaticSiteGeneratorPlugin from 'static-site-generator-webpack-plugin'
    
  export default {
      entry: {
          main: './components/Root/index.jsx',
      },
      output: {
          path: path.join(process.cwd(), './public'),
          filename: '[name].[hash].js',
          libraryTarget: 'umd',
      },
    
        plugins: [
          // ...
          new StaticSiteGeneratorPlugin('main', '/', {}),
        ]
          // ...
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And this is <code>./components/Root/index.jsx</code> file:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react'
  import ReactDOMServer from 'react-dom/server'
  import HTMLDocument from 'react-html-document'
  
  import App from '../App/index.jsx'
  
  export default function (locals, callback) {
      const MyHtml = (
          &lt;HTMLDocument
              title='My Page'
              metatags={[
                { name: 'description', content: 'My description' },
              ]}
              scripts={[ `${locals.assets.main}` ]}&gt;
              &lt;App /&gt;
          &lt;/HTMLDocument&gt;
      )
  
      const html = ReactDOMServer.renderToStaticMarkup(MyHtml, locals.assets)
      callback(null, '&lt;!doctype html&gt;' + html)
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I'm trying to use it I see the Error message: <code>ERROR in ReferenceError: self is not defined</code>. What does it mean?</p>