<commit_before>var path = require('path');
var webpack = require('webpack');
var TARGET = process.env.TARGET || null;

var config = {
  entry: {
    index: './src/react-midnight.js',
  },
  output: {
    path: path.join(__dirname, 'dist'),
    publicPath: 'dist/',
    filename: 'react-midnight.js',
    sourceMapFilename: 'react-midnight.sourcemap.js',
    library: 'ReactMidnight',
    libraryTarget: 'umd'
  },
  module: {
    loaders: [
      {test: /\.(js|jsx)/, loader: 'babel?stage=0'}
    ]
  },
  plugins: [],
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  externals: {
    'react': 'React',
    'react-dom': 'ReactDOM'
  },
};

if (TARGET === 'minify') {
  config.output.filename = 'react-midnight.min.js';
  config.output.sourceMapFilename = 'react-midnight.min.js';
  config.plugins.push(new webpack.optimize.UglifyJsPlugin({
    compress: {
      warnings: false
    },
    mangle: {
      except: ['React', 'ReactDOM', 'ReactMidnight']
    }
  }));
}

module.exports = config;
<commit_msg>exclude PropTypes from production build<commit_after>var path = require('path');
var webpack = require('webpack');
var TARGET = process.env.TARGET || null;

var config = {
  entry: {
    index: './src/react-midnight.js',
  },
  output: {
    path: path.join(__dirname, 'dist'),
    publicPath: 'dist/',
    filename: 'react-midnight.js',
    sourceMapFilename: 'react-midnight.sourcemap.js',
    library: 'ReactMidnight',
    libraryTarget: 'umd'
  },
  module: {
    loaders: [
      {test: /\.(js|jsx)/, loader: 'babel?stage=0'}
    ]
  },
  plugins: [],
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  externals: {
    'react': 'React',
    'react-dom': 'ReactDOM',
    'prop-types': 'PropTypes'
  },
};

if (TARGET === 'minify') {
  config.output.filename = 'react-midnight.min.js';
  config.output.sourceMapFilename = 'react-midnight.min.js';
  config.plugins.push(new webpack.optimize.UglifyJsPlugin({
    compress: {
      warnings: false
    },
    mangle: {
      except: ['React', 'ReactDOM', 'ReactMidnight']
    }
  }));
}

module.exports = config;

{'fraction_non_alphanumeric': 0.19077366650648728, 'fraction_numerical': 0.0009610764055742432, 'mean_word_length': 3.1146245059288535, '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': '6401355', 'n_tokens_mistral': 743, 'n_tokens_neox': 750, 'n_words': 134}