<commit_before>const path = require("path");
const webpack = require("webpack");
const AssetsPlugin = require("assets-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");

const production = process.env.NODE_ENV === "production";

const config = {
    entry: {
        common: path.join(__dirname, "browser/common.js"),
        visits: path.join(__dirname, "browser/visits.js")
    },
    output: {
        path: path.join(__dirname, "build/assets"),
        filename: "[name]-[chunkhash].js"
    },
    module: {
        loaders: [
            {
                test: /\.jsx?$/,
                exclude: /node_modules/,
                loader: "babel",
                query: {
                    presets: [["es2015", {modules: false}], "react"],
                    plugins: ["transform-object-rest-spread"]
                }
            },
            {
                test: /\.s?css$/,
                loader: ExtractTextPlugin.extract([
                    {
                        loader: "css",
                        query: {
                            minimize: production
                        }
                    },
                    {
                        loader: "sass"
                    }
                ])
            },
            {
                test: /\.(eot|woff2|woff|ttf|svg|png)$/,
                loader: "file-loader"
            }
        ]
    },
    plugins: [
        new CleanWebpackPlugin([
            "build"
        ]),
        new webpack.DefinePlugin({
            "process.env": {
                "NODE_ENV": JSON.stringify(production ? "production" : "development")
            }
        }),
        new webpack.optimize.CommonsChunkPlugin({
            name: "common",
            filename: "common-[chunkhash].js"
        }),
        new ExtractTextPlugin("[name]-[contenthash].css"),
        new AssetsPlugin({
            path: path.join(__dirname, "build"),
            filename: "assets.json",
            prettyPrint: true
        })
    ],
    devtool: "eval-source-map"
};

if (production) {
    config.plugins.push(
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            },
            mangle: true
        })
    );
    config.devtool = "source-map";
}

module.exports = config;
<commit_msg>Add -loader suffix to loader names<commit_after>const path = require("path");
const webpack = require("webpack");
const AssetsPlugin = require("assets-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");

const production = process.env.NODE_ENV === "production";

const config = {
    entry: {
        common: path.join(__dirname, "browser/common.js"),
        visits: path.join(__dirname, "browser/visits.js")
    },
    output: {
        path: path.join(__dirname, "build/assets"),
        filename: "[name]-[chunkhash].js"
    },
    module: {
        loaders: [
            {
                test: /\.jsx?$/,
                exclude: /node_modules/,
                loader: "babel-loader",
                query: {
                    presets: [["es2015", {modules: false}], "react"],
                    plugins: ["transform-object-rest-spread"]
                }
            },
            {
                test: /\.s?css$/,
                loader: ExtractTextPlugin.extract([
                    {
                        loader: "css-loader",
                        query: {
                            minimize: production
                        }
                    },
                    {
                        loader: "sass-loader"
                    }
                ])
            },
            {
                test: /\.(eot|woff2|woff|ttf|svg|png)$/,
                loader: "file-loader"
            }
        ]
    },
    plugins: [
        new CleanWebpackPlugin([
            "build"
        ]),
        new webpack.DefinePlugin({
            "process.env": {
                "NODE_ENV": JSON.stringify(production ? "production" : "development")
            }
        }),
        new webpack.optimize.CommonsChunkPlugin({
            name: "common",
            filename: "common-[chunkhash].js"
        }),
        new ExtractTextPlugin("[name]-[contenthash].css"),
        new AssetsPlugin({
            path: path.join(__dirname, "build"),
            filename: "assets.json",
            prettyPrint: true
        })
    ],
    devtool: "eval-source-map"
};

if (production) {
    config.plugins.push(
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            },
            mangle: true
        })
    );
    config.devtool = "source-map";
}

module.exports = config;

{'fraction_non_alphanumeric': 0.1325102880658436, 'fraction_numerical': 0.00205761316872428, 'mean_word_length': 1.3125594671741199, 'pattern_counts': {'":': 4, '<': 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': '1155479', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1256, 'n_words': 223}