<commit_before>const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const CompressionPlugin = require('compression-webpack-plugin');

const config = {
    entry: path.resolve(__dirname, './src/index.js'),
    output: {
        path: path.resolve(__dirname, './dist'),
        filename: 'app.bundle.js',
    },
    module: {
        rules: [
            {
                test: /\.jsx?$/,
                exclude: [/node_modules/],
                use: ['babel-loader', 'eslint-loader'],
            },
            {
                test: /\.less$/,
                use: [
                    'style-loader',
                    'css-loader',
                    'postcss-loader',
                    'less-loader',
                ],
            },
            {
                test: /\.svg$/,
                loader: 'raw-loader',
            },
        ],
    },
    devtool: 'cheap-eval-source-map',
    watchOptions: {
        ignored: /node_modules/,
    },
    plugins: [],
};

const PROD_ENV = process.argv.includes('-p');

if (PROD_ENV) {
    config.plugins.push(new CompressionPlugin({
        asset: '[path].gz[query]',
        algorithm: 'gzip',
        test: /\.(js|html)$/,
        threshold: 10240,
        minRatio: 0.8
    }));
} else {
    config.plugins.push(new BundleAnalyzerPlugin());
}

module.exports = config;<commit_msg>Remove devtool in production build<commit_after>const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

const config = {
    entry: path.resolve(__dirname, './src/index.js'),
    output: {
        path: path.resolve(__dirname, './dist'),
        filename: 'app.bundle.js',
    },
    module: {
        rules: [
            {
                test: /\.jsx?$/,
                exclude: [/node_modules/],
                use: ['babel-loader', 'eslint-loader'],
            },
            {
                test: /\.less$/,
                use: [
                    'style-loader',
                    'css-loader',
                    'postcss-loader',
                    'less-loader',
                ],
            },
            {
                test: /\.svg$/,
                loader: 'raw-loader',
            },
        ],
    },
    watchOptions: {
        ignored: /node_modules/,
    },
    plugins: [],
};

const PROD_ENV = process.argv.includes('-p');

if (!PROD_ENV) {
    config.plugins.push(new BundleAnalyzerPlugin());
    config.devtool = 'cheap-eval-source-map';
}

module.exports = config;
{'fraction_non_alphanumeric': 0.1588674793550924, 'fraction_numerical': 0.0027526543452615023, 'mean_word_length': 1.4022662889518414, 'pattern_counts': {'":': 0, '<': 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': '304515', 'n_tokens_mistral': 759, 'n_tokens_neox': 718, 'n_words': 123}