<commit_before>'use strict';

const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const autoprefixer = require('autoprefixer');

const NODE_ENV = process.env.NODE_ENV || 'development';
const DEV = NODE_ENV === 'development';

module.exports = {
  context: path.resolve('app/'),

  entry: {
    index: './index',
  },

  output: {
    path: path.resolve('public/build/'),
    publicPath: '/build/',
    filename: '[name].js',
  },

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: `babel-loader?${ JSON.stringify({
          presets: [
            ['env', {
              targets: {
                browsers: 'last 2 versions',
              },
            }],
          ],
        }) }`,
      },
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract('style-loader', [
          `css-loader?${ JSON.stringify({
            modules: true,
            camelCase: true,
            importLoaders: 1,
            localIdentName: DEV ? '[path][name]-[local]-[hash:base64:5]' : '[hash:base64]',
          }) }`,
          'postcss-loader',
        ]),
      },
    ],
  },

  postcss: [
    autoprefixer({
      browsers: ['last 2 versions'],
    }),
  ],

  plugins: [
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: JSON.stringify(NODE_ENV),
      },
    }),
    new webpack.ProvidePlugin({
      fetch: 'imports-loader?this=>global!exports-loader?global.fetch!whatwg-fetch',
    }),
    new webpack.optimize.CommonsChunkPlugin('common.js'),
    new ExtractTextPlugin('[name].css', {
      allChunks: true,
      disable: NODE_ENV === 'development',
    }),
  ],

  devtool: 'source-map',
};<commit_msg>Updated webpack config<commit_after>'use strict';

const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const autoprefixer = require('autoprefixer');

const NODE_ENV = process.env.NODE_ENV || 'development';
const isDev = NODE_ENV === 'development';

module.exports = {
  context: path.resolve('app/'),

  entry: {
    index: './index',
  },

  output: {
    path: path.resolve('public/build/'),
    publicPath: '/build/',
    filename: '[name].js',
  },

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: `babel-loader?${ JSON.stringify({
          presets: [
            ['env', {
              targets: {
                browsers: 'last 2 versions',
              },
            }],
          ],
        }) }`,
      },
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract('style-loader', [
          `css-loader?${ JSON.stringify({
            modules: true,
            camelCase: true,
            importLoaders: 1,
            localIdentName: isDev ? '[path][name]-[local]-[hash:base64:5]' : '[hash:base64]',
          }) }`,
          'postcss-loader',
        ]),
      },
    ],
  },

  postcss: [
    autoprefixer({
      browsers: ['last 2 versions'],
    }),
  ],

  plugins: [
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: JSON.stringify(NODE_ENV),
      },
    }),
    new webpack.ProvidePlugin({
      fetch: 'imports-loader?this=>global!exports-loader?global.fetch!whatwg-fetch',
    }),
    new webpack.optimize.CommonsChunkPlugin({name: 'common'}),
    new ExtractTextPlugin('[name].css', {
      allChunks: true,
      disable: isDev,
    }),
  ],

  devtool: 'source-map',
};
{'fraction_non_alphanumeric': 0.17336330429896038, 'fraction_numerical': 0.00449564484405732, 'mean_word_length': 2.0983463881636206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7346056', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1114, 'n_words': 192}