<commit_before>import { join } from 'path'
import { optimize } from 'webpack'

const env = process && process.env && process.env.NODE_ENV
const tsConfig = env && env === 'production' ? { configFileName: 'tsconfig.prod.json' } : {}

export default {
  entry: join(__dirname, 'src/index.ts'),
  output: {
    path: join(__dirname, 'dist'),
    libraryTarget: 'umd',
    library: 'shortcutJS',
    filename: 'shortcut.js'
  },
  resolve: {
    extensions: ['.ts', '.js']
  },
  module: {
    rules: [{
      test: /\.ts$/,
      use: [
        {
          loader: 'babel-loader',
          options: { presets: ['es2015'] }
        },
        {
          loader: 'ts-loader',
          options: tsConfig
        }
      ],
      exclude: [
        join(__dirname, 'node_modules'),
        join(__dirname, 'test')
      ]
    }]
  },
  plugins: [
    new optimize.UglifyJsPlugin()
  ]
}<commit_msg>feat(shortcutJS): Generate sourcemaps for better debugging<commit_after>import { join } from 'path'
import { optimize } from 'webpack'

const env = process && process.env && process.env.NODE_ENV
const tsConfig = env && env === 'production' ? { configFileName: 'tsconfig.prod.json' } : {}

export default {
  entry: join(__dirname, 'src/index.ts'),
  devtool: 'cheap-source-map',
  output: {
    path: join(__dirname, 'dist'),
    libraryTarget: 'umd',
    library: 'shortcutJS',
    filename: 'shortcut.js'
  },
  resolve: {
    extensions: ['.ts', '.js']
  },
  module: {
    rules: [{
      test: /\.ts$/,
      use: [
        {
          loader: 'babel-loader',
          options: { presets: ['es2015'] }
        },
        {
          loader: 'ts-loader',
          options: tsConfig
        }
      ],
      exclude: [
        join(__dirname, 'node_modules'),
        join(__dirname, 'test')
      ]
    }]
  },
  plugins: [
    new optimize.UglifyJsPlugin({sourceMap: true})
  ]
}
{'fraction_non_alphanumeric': 0.1660457690260777, 'fraction_numerical': 0.004257583821181479, 'mean_word_length': 2.2358003442340793, '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': '4073762', 'n_tokens_mistral': 623, 'n_tokens_neox': 604, 'n_words': 130}