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

var config = {
    entry: "./index.js",
    output: {
        path: __dirname + "/dist",
        filename: "bundle.js",
        publicPath: "/dist",
    },
    devtool: "sourceMap",
    module: {
        rules: [
            {
                test: /\.jsx?$/,
                exclude: /node_modules/,
                use: "babel-loader",
            },
        ],
    },
    plugins: [
        new webpack.DefinePlugin({
            "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
        }),
    ],
};

module.exports = config;
<commit_msg>Pass git commit info to bundles<commit_after>var webpack = require("webpack");
var path = require("path");
var {execSync} = require("child_process");

var gitRev = execSync("git rev-parse HEAD").toString();
var gitMessage = execSync("git log -1 --pretty=%B").toString();
var gitDate = execSync("git log -1 --format=%cd ").toString();

var config = {
    entry: "./index.js",
    output: {
        path: __dirname + "/dist",
        filename: "bundle.js",
        publicPath: "/dist",
    },
    devtool: "sourceMap",
    module: {
        rules: [
            {
                test: /\.jsx?$/,
                exclude: /node_modules/,
                use: "babel-loader",
            },
        ],
    },
    plugins: [
        new webpack.DefinePlugin({
            "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
            "GIT_COMMIT_REV": JSON.stringify(gitRev),
            "GIT_COMMIT_MESSAGE": JSON.stringify(gitMessage),
            "GIT_COMMIT_DATE": JSON.stringify(gitDate),
        }),
    ],
};

module.exports = config;

{'fraction_non_alphanumeric': 0.16102198455139632, 'fraction_numerical': 0.0011883541295306002, 'mean_word_length': 1.8984509466437178, 'pattern_counts': {'":': 5, '<': 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': '4394890', 'n_tokens_mistral': 521, 'n_tokens_neox': 505, 'n_words': 102}