<commit_before>require('@babel/polyfill');
const webpack = require('webpack');
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const dotenv = require('dotenv');

module.exports = () => {
  const env = dotenv.config().parsed;

  const envKeys = Object.keys(env).reduce((prev, next) => {
    prev[`process.env.${next}`] = JSON.stringify(env[next]); // eslint-disable-line
    return prev;
  }, {});

  return {
    entry: ['@babel/polyfill', 'react-hot-loader/patch', './src/index.js'],
    resolve: {
      modules: [path.resolve(process.cwd(), 'src'), path.resolve(process.cwd(), 'node_modules')],
    },
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: ['babel-loader'],
        },
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: ['babel-loader', 'eslint-loader'],
        },
      ],
    },
    output: {
      path: path.join(__dirname, 'src', 'static', 'js'),
      publicPath: '/js/',
      filename: 'bundle.js',
    },
    plugins: [
      new CleanWebpackPlugin({
        cleanOnceBeforeBuildPatterns: [path.join(__dirname, 'src', 'static', 'js', 'bundle.js')]
      }),
      new webpack.HotModuleReplacementPlugin(),
      new webpack.DefinePlugin(envKeys),
    ],
    devServer: {
      contentBase: 'src/static/',
      hot: true,
      historyApiFallback: {
        index: '/index-static.html',
      },
    },
  };
};<commit_msg>inline-source-map<commit_after>require('@babel/polyfill');
const webpack = require('webpack');
const path = require('path'); // eslint-disable-line
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const dotenv = require('dotenv');

module.exports = () => {
  const env = dotenv.config().parsed;

  const envKeys = Object.keys(env).reduce((prev, next) => {
    prev[`process.env.${next}`] = JSON.stringify(env[next]); // eslint-disable-line
    return prev;
  }, {});

  return {
    entry: ['@babel/polyfill', 'react-hot-loader/patch', './src/index.js'],
    resolve: {
      modules: [path.resolve(process.cwd(), 'src'), path.resolve(process.cwd(), 'node_modules')],
    },
    devtool: 'inline-source-map',
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: ['babel-loader'],
        },
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: ['babel-loader', 'eslint-loader'],
        },
      ],
    },
    output: {
      path: path.join(__dirname, 'src', 'static', 'js'),
      publicPath: '/js/',
      filename: 'bundle.js',
    },
    plugins: [
      new CleanWebpackPlugin({
        cleanOnceBeforeBuildPatterns: [path.join(__dirname, 'src', 'static', 'js', 'bundle.js')],
      }),
      new webpack.HotModuleReplacementPlugin(),
      new webpack.DefinePlugin(envKeys),
    ],
    devServer: {
      contentBase: 'src/static/',
      hot: true,
      historyApiFallback: {
        index: '/index-static.html',
      },
    },
  };
};
{'fraction_non_alphanumeric': 0.19273560209424084, 'fraction_numerical': 0.0, 'mean_word_length': 2.454237288135593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2844208', 'n_tokens_mistral': 990, 'n_tokens_neox': 975, 'n_words': 169}