text: require('babel-polyfill');
  
  // Webpack config for creating the production bundle.
  var path = require('path');
  var webpack = require('webpack');
  var CleanPlugin = require('clean-webpack-plugin');
  var ExtractTextPlugin = require('extract-text-webpack-plugin');
  
  var projectRootPath = path.resolve(__dirname, '../');
  var assetsPath = path.resolve(projectRootPath, './static/dist');
  
  // https://github.com/halt-hammerzeit/webpack-isomorphic-tools
  var WebpackIsomorphicToolsPlugin = require('webpack-isomorphic-tools/plugin');
  var webpackIsomorphicToolsPlugin = new WebpackIsomorphicToolsPlugin(require('./webpack-isomorphic-tools'));
  
  var shared = require('./shared.config');
  
  module.exports = Object.assign({}, shared, {
    module: {
      loaders: [
        ...shared.module.loaders,
        { test: /\.jsx?$/, exclude: /node_modules/, loaders: [strip.loader('debug'), 'babel']},
      ],
    },
    output: {
      path: assetsPath,
      filename: '[name]-[chunkhash].js',
      chunkFilename: '[name]-[chunkhash].js',
      publicPath: '/dist/'
    },
    plugins: [
      new CleanPlugin([assetsPath], { root: projectRootPath }),
  
      // css files from the extract-text-plugin loader
      new ExtractTextPlugin('[name]-[chunkhash].css', {allChunks: true}),
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: '"production"'
        },
  
        __CLIENT__: true,
        __SERVER__: false,
        __DEVELOPMENT__: false,
        __DEVTOOLS__: false
      }),
  
      // ignore dev config
      new webpack.IgnorePlugin(/\.\/dev/, /\/config$/),
  
      // optimizations
      new webpack.optimize.DedupePlugin(),
      new webpack.optimize.OccurenceOrderPlugin(),
      new webpack.optimize.UglifyJsPlugin({
        compress: {
          warnings: false
        }
      }),
  
      webpackIsomorphicToolsPlugin
    ]
  });
  