title: 'window is not defined' error when using style-loader with webpack
body: <p>Building a server side react app and while using Webpack I am having issues with Style-Loader.</p>
  
  <p>I am using version "^0.23.1" and when running a script to bundle and build there is an issue from Style-Loader. </p>
  
  <p>The issue is <code>window is not defined</code></p>
  
  <pre><code>webpack:///./node_modules/style-loader/lib/addStyles.js?:23
      return window &amp;&amp; document &amp;&amp; document.all &amp;&amp; !window.atob;
  </code></pre>
  
  <p>Has anyone run into this issue? After looking through Stack and the Github issues for style-loader I am not finding any solution.</p>
  
  <p>Here is my webpack file:</p>
  
  <pre><code>const path = require('path');
  const webpack = require('webpack');
  
  module.exports = {
    // webpack to use node
    target: 'node',
    entry: './src/index.js',
    output: {
      filename: 'client-build.js',
      path: path.resolve(__dirname, 'build/public'),
      publicPath: '/build/public'
    },
    module: {
      rules: [
        {
          test: /\.js$|\.jsx$/,
          loader: 'babel-loader',
          exclude: '/node_modules/',
          options: {
            presets: [
              '@babel/preset-react'
            ]
          }
        },
        {
          test: /\.(s*)css$/,
          loader: ['style-loader', 'css-loader', 'sass-loader']
        },
        {
          test: /\.jpeg$|\.gif$|\.png$|\.svg$|\.woff$|\.ttf$|\.wav$|\.mp3$|\.jpg$|\.pdf$/,
          loader: 'file-loader',
          query: {
            name: 'assets/img/[name].[ext]'
          },
        },
      ]
    },
    plugins: [
      new webpack.ProvidePlugin({
        "React": "react",
      }),
    ],
  }
  </code></pre>
  
  <p>If there is anything else you need to see I can post it.</p>