text: const webpack = require('webpack');
  const path = require('path');
  const ManifestPlugin = require('webpack-manifest-plugin');
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
  
  const ExtractTextPluginConfig = new ExtractTextPlugin({
    filename: 'static/css/[name].[contenthash:8].css',
  });
  const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
    template: './public/index.html',
    filename: 'index.html',
    inject: 'body',
    minify: {
      removeComments: true,
      collapseWhitespace: true,
      removeRedundantAttributes: true,
      useShortDoctype: true,
      removeEmptyAttributes: true,
      removeStyleLinkTypeAttributes: true,
      keepClosingSlash: true,
      minifyJS: true,
      minifyCSS: true,
      minifyURLs: true,
    },
  });
  const FaviconsWebpackPluginConfig = new FaviconsWebpackPlugin({
    logo: './public/logo.png',
    prefix: 'static/icons-[hash:8]/',
  });
  
  module.exports = {
    entry: './src/index.jsx',
    output: {
      path: path.join(__dirname, 'build'),
      filename: 'static/js/main.[hash:8].js',
    },
    resolve: {
      extensions: ['.js', '.jsx'],
    },
    module: {
      rules: [
        {
          test: /\.css$/,
          exclude: /node_modules/,
          use: ExtractTextPlugin.extract({
            use: [
              {
                loader: 'css-loader',
                options: {
                  module: true,
                  importLoaders: 1,
                  minimize: true,
                  sourceMap: true,
                },
              },
            ],
            fallback: 'style-loader',
          }),
        },
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
        },
      ],
    },
    plugins: [
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: JSON.stringify('production'),
        },
      }),
      new webpack.optimize.UglifyJsPlugin(),
      new webpack.optimize.OccurrenceOrderPlugin(),
      HtmlWebpackPluginConfig,
      ExtractTextPluginConfig,
      new webpack.LoaderOptionsPlugin({
        minimize: true,
      }),
      new ManifestPlugin({
        fileName: 'asset-manifest.json',
      }),
      new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
      FaviconsWebpackPluginConfig,
    ],
    node: {
      fs: 'empty',
      net: 'empty',
      tls: 'empty',
    },
  };
  