<commit_before>const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractSass = new ExtractTextPlugin({ filename: 'style.css', allChunks: true });

var sourceMap = '';
if (process.env.NODE_ENV !== 'production') {
  sourceMap = '#inline-source-map';
}

const plugins = [
  new webpack.ProvidePlugin({
    jQuery: 'jquery',
    $: 'jquery',
    jquery: 'jquery',
    Tether: 'tether',
  }),
  new webpack.DefinePlugin({ ENV: JSON.stringify(process.env.NODE_ENV) }),
];

if (process.env.NODE_ENV === 'production') {
  plugins.push(new webpack.optimize.UglifyJsPlugin());
}


module.exports = [
  // JS
  {
    context: `${__dirname}/src`,
    entry: {
      background: './chrome/background',
      browser_action: './chrome/browser_action',
      inject: './chrome/inject',
      options: './option',
    },
    output: {
      path: `${__dirname}/dist`,
      filename: '[name].js',
    },
    plugins,
    module: {
      loaders: [
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
          query: {
            presets: ['es2015', 'react'],
            plugins: ['transform-flow-strip-types'],
          },
        },
      ],
    },
    resolve: {
      extensions: ['.js', '.jsx'],
    },
    devtool: sourceMap,
  },


  // SCSS
  {
    context: `${__dirname}/src`,
    entry: {
      style: './chrome/static/style/index.js',
    },
    output: {
      path: `${__dirname}/dist`,
      filename: '[name].js',
    },
    module: {
      loaders: [
        {
          test: /\.scss$/,
          loader: ExtractTextPlugin.extract('css-loader!sass-loader'),
        },
        {
          test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/font-woff',
        }, {
          test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/font-woff',
        }, {
          test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/octet-stream',
        }, {
          test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'file-loader',
        }, {
          test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=image/svg+xml',
        }
      ],
    },
    plugins: [
      extractSass,
      new CopyWebpackPlugin([
        { from: 'chrome/static/html' },
      ]),
    ],
  },
];<commit_msg>Integrate css settings and minimize<commit_after>const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractSass = new ExtractTextPlugin({ filename: 'style.css', allChunks: true });

var sourceMap = '';
if (process.env.NODE_ENV !== 'production') {
  sourceMap = '#inline-source-map';
}

const plugins = [
  new webpack.ProvidePlugin({
    jQuery: 'jquery',
    $: 'jquery',
    jquery: 'jquery',
    Tether: 'tether',
  }),
  new webpack.DefinePlugin({ ENV: JSON.stringify(process.env.NODE_ENV) }),
  extractSass,
  new CopyWebpackPlugin([
    { from: 'chrome/static/html' },
  ]),
];

if (process.env.NODE_ENV === 'production') {
  plugins.push(new webpack.optimize.UglifyJsPlugin());
}


module.exports = [
  {
    context: `${__dirname}/src`,
    entry: {
      background: './chrome/background',
      browser_action: './chrome/browser_action',
      inject: './chrome/inject',
      options: './option',
      style: './chrome/static/style/index.js',
    },
    output: {
      path: `${__dirname}/dist`,
      filename: '[name].js',
    },
    plugins,
    module: {
      loaders: [
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
          query: {
            presets: ['es2015', 'react'],
            plugins: ['transform-flow-strip-types'],
          },
        },
        {
          test: /\.scss$/,
          loader: ExtractTextPlugin.extract('css-loader?minimize!sass-loader'),
        },
        {
          test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/font-woff',
        },
        {
          test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/font-woff',
        },
        {
          test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=application/octet-stream',
        },
        {
          test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'file-loader',
        },
        {
          test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
          loader: 'url-loader?limit=10000&mimetype=image/svg+xml',
        },
      ],
    },
    resolve: {
      extensions: ['.js', '.jsx', '.scss', '.css'],
    },
    devtool: sourceMap,
  },
];
{'fraction_non_alphanumeric': 0.20584031039411885, 'fraction_numerical': 0.010210332856851132, 'mean_word_length': 2.044126786824114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3347228', 'n_tokens_mistral': 1694, 'n_tokens_neox': 1628, 'n_words': 245}