<commit_before>/* eslint-disable import/no-commonjs */
const fs = require('fs');
const path = require('path');
const process = require('process');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');


const isProd = process.env.NODE_ENV === 'production';

const distDirName = 'dist';

const sharedPlugins = [
  new webpack.DefinePlugin({
    'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
  }),
  new HtmlWebpackPlugin({
    filename: 'demo.html',
    chunks: ['demo'],
    template: './demo.html',
    inject: true,
  }),
];
const prodPlugins = [
  ...sharedPlugins,
  new ExtractTextPlugin('[name]-[hash:6].bundle.css'),
];
const devPlugins = [
  ...sharedPlugins,
  new webpack.HotModuleReplacementPlugin(),
  new webpack.NamedModulesPlugin(),
];

const prodEntry = { demo: ['demo.tsx'] };
const devEntry = { ...prodEntry, FileDrop: ['FileDrop.tsx'] };

const rhlBabelLoader = {
  loader: 'babel-loader',
  options: {
    plugins: ['react-hot-loader/babel'],
  },
};
const tsLoader = 'ts-loader';
const cssLoader = 'css-loader';
const styleLoader = 'style-loader';

module.exports = {
  context: path.resolve(__dirname),

  entry: isProd ? prodEntry : devEntry,

  output: {
    publicPath: '/', // Where you uploaded your bundled files. (Relative to server root)
    path: path.resolve(__dirname, distDirName), // Local disk directory to store all your output files (Absolute path)
    filename: '[name].bundle.js',
  },

  module: {
    rules: [
      {
        test: /\.(j|t)sx?$/,
        exclude: [path.resolve(__dirname, 'node_modules')],
        use: isProd ? [tsLoader] : [rhlBabelLoader, tsLoader],
      },
      {<commit_msg>Add FileDrop to the prodEntry too<commit_after>/* eslint-disable import/no-commonjs */
const fs = require('fs');
const path = require('path');
const process = require('process');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');


const isProd = process.env.NODE_ENV === 'production';

const distDirName = 'dist';

const sharedPlugins = [
  new webpack.DefinePlugin({
    'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
  }),
  new HtmlWebpackPlugin({
    filename: 'demo.html',
    chunks: ['demo'],
    template: './demo.html',
    inject: true,
  }),
];
const prodPlugins = [
  ...sharedPlugins,
  new ExtractTextPlugin('[name]-[hash:6].bundle.css'),
];
const devPlugins = [
  ...sharedPlugins,
  new webpack.HotModuleReplacementPlugin(),
  new webpack.NamedModulesPlugin(),
];

const prodEntry = { demo: ['demo.tsx'], FileDrop: ['FileDrop.tsx'] };
const devEntry = { ...prodEntry };

const rhlBabelLoader = {
  loader: 'babel-loader',
  options: {
    plugins: ['react-hot-loader/babel'],
  },
};
const tsLoader = 'ts-loader';
const cssLoader = 'css-loader';
const styleLoader = 'style-loader';

module.exports = {
  context: path.resolve(__dirname),

  entry: isProd ? prodEntry : devEntry,

  output: {
    publicPath: '/', // Where you uploaded your bundled files. (Relative to server root)
    path: path.resolve(__dirname, distDirName), // Local disk directory to store all your output files (Absolute path)
    filename: '[name].bundle.js',
  },

  module: {
    rules: [
      {
        test: /\.(j|t)sx?$/,
        exclude: [path.resolve(__dirname, 'node_modules')],
        use: isProd ? [tsLoader] : [rhlBabelLoader, tsLoader],
      },
      {
{'fraction_non_alphanumeric': 0.16433761878144215, 'fraction_numerical': 0.0005589714924538849, 'mean_word_length': 3.8364864864864865, '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': '5241616', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1126, 'n_words': 263}