<commit_before>const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
const TimerPlugin = require('./timer-plugin');
const path = require('path');

const BUILD_PREFIX = '.sambell';
const getBuildDir = scope => path.join(BUILD_PREFIX, scope);

module.exports = (target = 'web', env = 'dev') => {
  const IS_NODE = target === 'node';
  const IS_WEB = target === 'web';

  const IS_PROD = env === 'prod';
  const IS_DEV = env === 'dev';
  process.env.NODE_ENV = IS_PROD ? 'production' : 'development';

  const SERVER_ENTRY = 'server';
  const CLIENT_ENTRY = 'client';
  const scope = IS_NODE ? SERVER_ENTRY : CLIENT_ENTRY;

  const buildDir = getBuildDir(scope);

  let config = {
    target: target,
    context: process.cwd(),
    entry: {
      run: [
        require.resolve('babel-polyfill'),
        require.resolve(`isomorphic-fetch/fetch-npm-${IS_NODE ? 'node' : 'browserify'}`),
        IS_NODE ? 'source-map-support/register' : null,
        scope,
      ].filter(x => x),
    },

    output: {
      path: path.resolve(process.cwd(), buildDir),
      publicPath: '/static/webpack/',
      filename: `${IS_WEB && IS_PROD ? '[hash].' : ''}[name].js`,<commit_msg>require resolve<commit_after>const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
const TimerPlugin = require('./timer-plugin');
const path = require('path');

const BUILD_PREFIX = '.sambell';
const getBuildDir = scope => path.join(BUILD_PREFIX, scope);

module.exports = (target = 'web', env = 'dev') => {
  const IS_NODE = target === 'node';
  const IS_WEB = target === 'web';

  const IS_PROD = env === 'prod';
  const IS_DEV = env === 'dev';
  process.env.NODE_ENV = IS_PROD ? 'production' : 'development';

  const SERVER_ENTRY = 'server';
  const CLIENT_ENTRY = 'client';
  const scope = IS_NODE ? SERVER_ENTRY : CLIENT_ENTRY;

  const buildDir = getBuildDir(scope);

  let config = {
    target: target,
    context: process.cwd(),
    entry: {
      run: [
        require.resolve('babel-polyfill'),
        require.resolve(`isomorphic-fetch/fetch-npm-${IS_NODE ? 'node' : 'browserify'}`),
        IS_NODE ? require.resolve('source-map-support/register') : null,
        scope,
      ].filter(x => x),
    },

    output: {
      path: path.resolve(process.cwd(), buildDir),
      publicPath: '/static/webpack/',
      filename: `${IS_WEB && IS_PROD ? '[hash].' : ''}[name].js`,
{'fraction_non_alphanumeric': 0.1730374023838882, 'fraction_numerical': 0.0, 'mean_word_length': 3.515769944341373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1747377', 'n_tokens_mistral': 809, 'n_tokens_neox': 786, 'n_words': 176}