<commit_before>// webpack rules by name
'use strict'

const ExtractTextPlugin = require('extract-text-webpack-plugin')

const DATA_URL_BYTE_LIMIT = 8192

module.exports = {
  // babel loader for JSX
  babel: {
    test: /\.jsx?$/,
    exclude: /node_modules/,
    use: {
      loader: 'babel-loader',
      options: {
        cacheDirectory: true
      }
    }
  },

  // worker loader for inline webworkers
  worker: {
    test: /worker\.js$/,
    exclude: /node_modules/,
    use: {
      loader: 'worker-loader',
      options: {
        inline: true,
        fallback: false
      }
    }
  },

  // global CSS files
  globalCss: {
    test: /\.global\.css$/,
    use: ExtractTextPlugin.extract({
      use: 'css-loader',
      fallback: 'style-loader'
    })
  },

  // local CSS (CSS module) files
  localCss: {
    test: /^((?!\.global).)*\.css$/,
    use: ExtractTextPlugin.extract({
      use: {
        loader: 'css-loader',
        options: {
          modules: true,
          sourceMap: true,
          localIdentName: '[name]__[local]__[hash:base64:5]'
        }
      }
    })
  },

  // handlebars HTML templates
  handlebars: {<commit_msg>Do not use CSS extract text plugin in dev<commit_after>// webpack rules by name
'use strict'

const ExtractTextPlugin = require('extract-text-webpack-plugin')

const DEV = process.env.NODE_ENV !== 'production'
const DATA_URL_BYTE_LIMIT = 8192

const CSS_MODULE_LOADER = {
  loader: 'css-loader',
  options: {
    modules: true,
    sourceMap: true,
    localIdentName: '[name]__[local]__[hash:base64:5]'
  }
}

module.exports = {
  // babel loader for JSX
  babel: {
    test: /\.jsx?$/,
    exclude: /node_modules/,
    use: {
      loader: 'babel-loader',
      options: {
        cacheDirectory: true
      }
    }
  },

  // worker loader for inline webworkers
  worker: {
    test: /worker\.js$/,
    exclude: /node_modules/,
    use: {
      loader: 'worker-loader',
      options: {
        inline: true,
        fallback: false
      }
    }
  },

  // global CSS files
  globalCss: {
    test: /\.global\.css$/,
    use: DEV
      ? ['style-loader', 'css-loader']
      : ExtractTextPlugin.extract({use: 'css-loader', fallback: 'style-loader'})
  },

  // local CSS (CSS module) files
  localCss: {
    test: /^((?!\.global).)*\.css$/,
    use: DEV
      ? ['style-loader', CSS_MODULE_LOADER]
      : ExtractTextPlugin.extract({use: CSS_MODULE_LOADER})
  },

  // handlebars HTML templates
  handlebars: {
{'fraction_non_alphanumeric': 0.15060728744939272, 'fraction_numerical': 0.005668016194331984, 'mean_word_length': 2.213263979193758, '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': '4969731', 'n_tokens_mistral': 864, 'n_tokens_neox': 822, 'n_words': 185}