text: require('es6-promise').polyfill();
  var webpack = require('webpack');
  var path = require('path');
  
  var BUILD_DIR = path.resolve(__dirname, 'public');
  var APP_DIR = path.resolve(__dirname, 'client');
  var LESS_DIR = path.resolve(__dirname, 'less');
  
  var config = {
      devtool: 'source-map',
      entry: [
          'babel-polyfill',
          path.join(__dirname, 'client/index.jsx'),
          LESS_DIR + '/site.less'
      ],
      output: {
          path: BUILD_DIR,
          filename: 'bundle.min.js',
          publicPath: '/'
      },
      plugins: [
          new webpack.optimize.UglifyJsPlugin({
              sourceMap: true,
              compressor: {
                  warnings: false,
                  screw_ie8: true
              }
          }),
          new webpack.DefinePlugin({
              'process.env.NODE_ENV': JSON.stringify('production')
          }),
          new webpack.ProvidePlugin({
              $: 'jquery',
              jQuery: 'jquery'
          })
      ],
      module: {
          rules: [
              {
                  test: /\.jsx?/,
                  exclude: /(node_modules|bower_components)/,
                  loader: 'babel-loader'
              },
              {
                  test: /\.scss$/,
                  use: [
                      'style-loader',
                      'css-loader',
                      'sass-loader'
                  ]
              },
              {
                  test: /\.less$/,
                  use: [
                      'style-loader',
                      'css-loader',
                      'less-loader'
                  ]
              }, {
                  test: /.(png|woff(2)?|eot|ttf|svg)(\?[a-z0-9=\.]+)?$/, 
                  loader: 'url-loader?limit=100000'
              }]
      }
  };
  
  module.exports = config;