text: const webpack = require('webpack');
  const CompressionPlugin = require('compression-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  
  const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
    template: './client/index.html',
    filename: 'index.html',
    inject: 'body'
  });
  
  module.exports = {
    entry: {
      app: [
        // 'eventsource-polyfill', // necessary for hot reloading with IE,
        'webpack-hot-middleware/client',
        './client/index.jsx',
      ]
    },
    output: {
      path: `${__dirname}/dist/client`,
      filename: 'js/bundle.js',
      publicPath: '/static/',
    },
    resolve: {
      // you can now require("file") instead of require("file.coffee")
      extensions: ['.js', '.json', '.jsx']
    },
    node: {
      net: 'empty',
      tls: 'empty',
      dns: 'empty'
    },
    module: {
      loaders: [
        {
          test: /\.jsx*$/,
          loader: 'babel-loader',
          exclude: /node_modules/
        },
        {
          test: /\.scss$/,
          use: ExtractTextPlugin.extract({
            fallback: 'style-loader',
            use: ['css-loader', 'sass-loader'],
          }),
        },
        { test: /\.(woff|woff2)$/, loader: 'url-loader?prefix=font/&limit=5000&name=[path][name].[ext]' },
        { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader?name=[path][name].[ext]' },
        { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/octet-stream&name=[path][name].[ext]' },
        {
          test: /\.(jpe?g|gif|png|svg)$/i,
          loader: 'url-loader?limit=10000&name=[path][name].[ext]',
        },
      ]
    },
    plugins: [
      new webpack.optimize.UglifyJsPlugin({
        sourceMap: true,
        comments: false,
        minimize: true,
      }),
      new CompressionPlugin({
        asset: '[path].gz[query]',
        algorithm: 'gzip',
        test: /\.js$|\.css$|\.html$/,
        threshold: 10240,
        minRatio: 0.8
      }),
      HtmlWebpackPluginConfig,
      new ExtractTextPlugin({
        filename: 'css/style.css',
      }),
      new webpack.DefinePlugin({
        'process.env': {
          FIREBASE_STORAGE_BUCKET: JSON.stringify(process.env.FIREBASE_STORAGE_BUCKET),
          NODE_ENV: JSON.stringify('production')
        }
      }),
      new webpack.optimize.AggressiveMergingPlugin()
    ]
  };
  