<commit_before>/**
 * Created by v0n000p on 2/19/17.
 */

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

const path = require('path');
const webpack = require('webpack');
const isProduction = process.env.NODE_ENV === 'production';

console.log('isProduction', isProduction);

const plugins = [];
const optimization = {};
const loaders = [{ test: /\.tsx?$/, loader: 'ts-loader' }];

if (isProduction) {
  optimization.minimizer = [new UglifyJsPlugin()];
}

module.exports = {
  entry: path.resolve(__dirname, './src/containers/index.ts'),
  output: {
    path: path.resolve(__dirname, './dist'),
    filename: '[name].js',
  },
  resolve: {
    // Add `.ts` and `.tsx` as a resolvable extension.
    extensions: ['.ts', '.tsx', '.js'], // note if using webpack 1 you'd also need a '' in the array as well
  },
  module: {
    loaders: loaders,
  },
  optimization: optimization,
  plugins: plugins,
};<commit_msg>fix webpack config for latest version<commit_after>/**
 * Created by v0n000p on 2/19/17.
 */

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

const path = require('path');
const webpack = require('webpack');
const isProduction = process.env.NODE_ENV === 'production';

console.log('isProduction', isProduction);

const plugins = [];
const optimization = {};
const rules = [{ test: /\.tsx?$/, loader: 'ts-loader' }];

if (isProduction) {
  optimization.minimizer = [new UglifyJsPlugin()];
}

module.exports = {
  entry: path.resolve(__dirname, './src/containers/index.ts'),
  output: {
    path: path.resolve(__dirname, './dist'),
    filename: '[name].js',
  },
  resolve: {
    // Add `.ts` and `.tsx` as a resolvable extension.
    extensions: ['.ts', '.tsx', '.js'], // note if using webpack 1 you'd also need a '' in the array as well
  },
  module: {
    rules: rules,
  },
  optimization: optimization,
  plugins: plugins,
};
{'fraction_non_alphanumeric': 0.17880085653104924, 'fraction_numerical': 0.010706638115631691, 'mean_word_length': 3.767857142857143, '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': '7512504', 'n_tokens_mistral': 636, 'n_tokens_neox': 613, 'n_words': 165}