<commit_before>var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');

var config = {
  cache: true,
  entry: './static/js/main.js',
  output: {
    path: path.join(__dirname, 'static/output'),
    publicPath: '/output/',
    filename: 'bundle.js'
  },
  resolve: {
    extensions: ['', '.js', '.sjs'],
    fallback: __dirname,
    alias: {
      src: 'src',
      impl: 'static/js/impl',
      'static': 'static',
      'config.json': 'config/browser.json'
    }
  },
  module: {
    loaders: [
      {test: /\.js$/,
       exclude: [/static\/js\/lib\/.*\.js$/,
                 /node_modules\/.*/],
       loader: '6to5'},
      {test: /\.less$/, loader: "style!css!less" },
      {test: /\.css$/, loader: "style!css" },
      // {test: /\.less$/, loader: ExtractTextPlugin.extract("style-loader", "css!less") },
      // {test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css") },
      {test: /\.json$/, loader: "json"}
    ]
  },
  plugins: [
    new webpack.ProvidePlugin({
      regeneratorRuntime: 'static/js/regenerator-runtime.js'
    }),
    new ExtractTextPlugin('styles.css')
  ]
};

if(process.env.NODE_ENV === 'production') {
  config.plugins = config.plugins.concat([
    new webpack.DefinePlugin({
      "process.env": {
        NODE_ENV: JSON.stringify("production")
      }
    }),
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.UglifyJsPlugin({
      mangle: {
        except: ['GeneratorFunction', 'GeneratorFunctionPrototype']
      }
    }),
    new webpack.optimize.OccurenceOrderPlugin()
  ]);
}
else {
  config.devtool = 'sourcemap';<commit_msg>disable webpack extract text plugin for now<commit_after>var webpack = require('webpack');
var path = require('path');
//var ExtractTextPlugin = require('extract-text-webpack-plugin');

var config = {
  cache: true,
  entry: './static/js/main.js',
  output: {
    path: path.join(__dirname, 'static/output'),
    publicPath: '/output/',
    filename: 'bundle.js'
  },
  resolve: {
    extensions: ['', '.js', '.sjs'],
    fallback: __dirname,
    alias: {
      src: 'src',
      impl: 'static/js/impl',
      'static': 'static',
      'config.json': 'config/browser.json'
    }
  },
  module: {
    loaders: [
      {test: /\.js$/,
       exclude: [/static\/js\/lib\/.*\.js$/,
                 /node_modules\/.*/],
       loader: '6to5'},
      {test: /\.less$/, loader: "style!css!less" },
      {test: /\.css$/, loader: "style!css" },
      // {test: /\.less$/, loader: ExtractTextPlugin.extract("style-loader", "css!less") },
      // {test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css") },
      {test: /\.json$/, loader: "json"}
    ]
  },
  plugins: [
    new webpack.ProvidePlugin({
      regeneratorRuntime: 'static/js/regenerator-runtime.js'
    })
    //new ExtractTextPlugin('styles.css')
  ]
};

if(process.env.NODE_ENV === 'production') {
  config.plugins = config.plugins.concat([
    new webpack.DefinePlugin({
      "process.env": {
        NODE_ENV: JSON.stringify("production")
      }
    }),
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.UglifyJsPlugin({
      mangle: {
        except: ['GeneratorFunction', 'GeneratorFunctionPrototype']
      }
    }),
    new webpack.optimize.OccurenceOrderPlugin()
  ]);
}
else {
  config.devtool = 'sourcemap';
{'fraction_non_alphanumeric': 0.19622307465329006, 'fraction_numerical': 0.0011802891708468574, 'mean_word_length': 2.625668449197861, 'pattern_counts': {'":': 2, '<': 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': '610615', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1129, 'n_words': 201}