<commit_before>'use strict';

var webpack = require('webpack');
var path = require('path');
var port = process.env.HOT_LOAD_PORT || 3030;

var config = {
  devtool: 'eval',
  entry: [
    './client'
  ],
  output: {
    path: __dirname + '/public/js/',
    filename: 'client.js',
    publicPath: 'http://localhost:' + port + '/js/'
  },
  plugins: [
    new webpack.NoErrorsPlugin()
  ],
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  module: {
    loaders: [
      { test: /\.jsx?$/, loaders: ['react-hot', 'babel'], exclude: /node_modules/ },
      { test: /\.scss$/, loader: 'style-loader!raw-loader!sass-loader?includePaths[]=' + path.resolve(__dirname, 'node_modules') }
    ]
  }
};
if (process.env.NODE_ENV === 'development') {
  config.entry.push('webpack-dev-server/client?http://localhost:' + port);
  config.entry.push('webpack/hot/only-dev-server');
  config.plugins.push(new webpack.HotModuleReplacementPlugin());<commit_msg>update webpack production config<commit_after>'use strict';

import webpack from 'webpack';
import path from 'path';

var port = process.env.HOT_LOAD_PORT || 3030;

var config = {
  devtool: 'eval',
  entry: [ './client' ],
  output: {
    path: `${__dirname}/public/js/`,
    filename: 'client.js',
    publicPath: `http://localhost:${port}/js/`
  },
  plugins: [
    new webpack.NoErrorsPlugin()
  ],
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  module: {
    loaders: [
      { test: /\.jsx?$/, loaders: ['react-hot', 'babel'], exclude: /node_modules/ },
      { test: /\.scss$/, loader: 'style-loader!raw-loader!sass-loader?includePaths[]=' + path.resolve(__dirname, 'node_modules') }
    ]
  }
};

if (process.env.NODE_ENV === 'production') {
  config.plugins.push(new webpack.DefinePlugin({
    'process.env': {
      NODE_ENV: JSON.stringify('production')
    }
  }));
  config.plugins.push(new webpack.optimize.DedupePlugin());
  config.plugins.push(new webpack.optimize.UglifyJsPlugin());
}

if (process.env.NODE_ENV === 'development') {
  config.devtool = 'sourcemap';
  config.debug = true;
  config.entry.push('webpack-dev-server/client?http://localhost:' + port);
  config.entry.push('webpack/hot/only-dev-server');
  config.plugins.push(new webpack.HotModuleReplacementPlugin());
{'fraction_non_alphanumeric': 0.19902265659706797, 'fraction_numerical': 0.003553976010661928, 'mean_word_length': 3.672199170124481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1501424', 'n_tokens_mistral': 790, 'n_tokens_neox': 776, 'n_words': 133}