<commit_before>var webpack = require('webpack');
var path = require('path');

module.exports = {
  entry: {
    'app': './src/app.ts',
    'vendor': './src/vendor.ts'
  },
  output: {
    path: "./dist",
    filename: "bundle.js"
  },
  plugins: [
    new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js')
  ],

  resolve: {
    extensions: ['', '.ts', '.js']
  },

  module: {
    loaders: [
      { test: /\.ts$/, loader: 'ts-loader' },
    ],
    noParse: [ path.join(__dirname, 'node_modules', 'angular2', 'bundles') ]
  },

  devServer: {
    historyApiFallback: true
  }
};
<commit_msg>chore(webpack.conf): refactor to easier config<commit_after>var webpack = require('webpack');
var path = require('path');

module.exports = {
  entry: {
    'app':    './src/app.ts',
    'vendor': './src/vendor.ts'
  },

  output: {
    path:     './dist',
    filename: '[name].bundle.js'
  },

  plugins: [
    new webpack.optimize.CommonsChunkPlugin('vendor', '[name].bundle.js'),
  ],

  module: {
    loaders: [
      // .ts files for TypeScript
      { test: /\.ts$/, loader: 'ts-loader', exclude: /node_modules/ },

    ],
    noParse: noParseDirectories()
  },

  resolve: {
    extensions: ['', '.ts', '.js']
  },

  devServer: {
    historyApiFallback: true
  }
};



function noParseDirectories() {
  return [
    path.join(__dirname, 'node_modules', 'angular2', 'bundles')
  ];
}

{'fraction_non_alphanumeric': 0.20285714285714285, 'fraction_numerical': 0.0014285714285714286, 'mean_word_length': 2.7459893048128343, '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': '4965719', 'n_tokens_mistral': 506, 'n_tokens_neox': 496, 'n_words': 92}