text: const path = require('path');
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  const CopyWebpackPlugin = require('copy-webpack-plugin');
  const precss = require('precss');
  const autoprefixer = require('autoprefixer');
  
  module.exports = {
    entry: path.resolve(__dirname, 'app/index'),
    devServer: {
      historyApiFallback: true,
      outputPath: path.join(__dirname, 'build'),
    },
    resolve: {
      extensions: ['', '.js', '.jsx'],
    },
    output: {
      path: path.resolve(__dirname, 'build/js'),
      publicPath: '/js/',
      filename: 'bundle.js',
    },
    plugins: [
      new CleanWebpackPlugin(['build']),
      new CopyWebpackPlugin([
        {
          context: path.resolve(__dirname, 'app/static'),
          from: '**/*',
          to: path.resolve(__dirname, 'build'),
        },
      ]),
    ],
    debug: true,
    devtool: '#eval-source-map',
    module: {
      loaders: [
        {
          test: /\.jsx?$/,
          exclude: /(node_modules|bower_components)/,
          loaders: ['babel'],
        },
        {
          test: /\.css$/,
          loader: 'style-loader!css-loader!postcss-loader',
        },
      ],
    },
    postcss: () => [
      precss,
      autoprefixer,
    ],
  };