title: window not defined error when using extract-text-webpack-plugin React
body: <p>I'm using webpack to build my react components and I'm trying to use the <code>extract-text-webpack-plugin</code> to separate my css from my generated js file. However, when I attempt to build the component I get the following error:
  <code>Module build failed: ReferenceError: window is not defined</code>.</p>
  
  <p>My webpack.config.js file looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>var webpack = require('webpack');
  var ExtractTextPlugin = require('extract-text-webpack-plugin');
  
  module.exports = {
    entry: {
      MainComponent: './src/main.js'
    },
    output: {
      libraryTarget: 'var',
      library: 'MainComponent',
      path: './build',
      filename: '[name].js'
    },
    module: {
      loaders: [{
        test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader!css-loader')
      }]
    },
    plugins: [
      new ExtractTextPlugin('styles.css')
    ]
  }
  </code></pre>