<commit_before>// Webpack configuration file.
// <https://webpack.js.org/configuration/>
var webpack = require("webpack");
var path = require("path");
var fs = require("fs");

/** Use `package.json` file for external dependencies. */
function externalDependencies() {
  var packageJson = require("./package.json");
  var dependencies = packageJson["dependencies"];
  var externals = {};
  if (dependencies != null) {
    for (var key in dependencies) {
      externals[key] = "commonjs " + key;
    }
  }
  return externals;
}

/** Partial RxJS imports must be mapped to module. */
function rxJsDependencies() {
  var externals = {};
  var dependencies = [
    "rxjs/Observable",
    "rxjs/Subject",
    "rxjs/BehaviorSubject",
    "rxjs/add/observable/of",
    "rxjs/add/observable/forkJoin",
    "rxjs/add/operator/filter",
    "rxjs/add/operator/switchMap",
    "rxjs/add/operator/take",
    "rxjs/add/operator/timeout",
  ];
  for (var key of dependencies) {
    externals[key] = "commonjs rxjs";
  }
  return externals;
}

module.exports = {
  // Main script for binary.
  // Additional scripts bundled with application.
  entry: {
    "dist/main": path.resolve("./src/main.ts"),
    "dist/scripts/subprocess": path.resolve("./src/scripts/subprocess.ts"),
  },
  output: {
    path: path.resolve("./"),
    filename: "[name].js",
  },
  // TypeScript sources compiled by ts-loader to ES2016.
  // Passed to Babel for transpiling to ES2015 for minification.
  module: {
    loaders: [{
      test: /\.ts$/,
      exclude: /node_modules/,
      use: [
        { loader: "babel-loader", options: { presets: ["es2015"] } },
        { loader: "ts-loader" },
      ],
    }],
  },
  resolve: {
    extensions: [".ts"],
  },
  // Target Node environment.
  // Disable filename/dirname polyfills.
  target: "node",
  node: {
    __filename: false,
    __dirname: false,
  },
  // Generate source map for bundle.
  devtool: "source-map",
  // Do not bundle Node modules.
  externals: [externalDependencies(), rxJsDependencies(), {
    // Additional external dependencies added here.
  }],
};
<commit_msg>fix: fix webpack build<commit_after>// Webpack configuration file.
// <https://webpack.js.org/configuration/>
var webpack = require("webpack");
var path = require("path");
var fs = require("fs");

/** Use `package.json` file for external dependencies. */
function externalDependencies() {
  var packageJson = require("./package.json");
  var dependencies = packageJson["dependencies"];
  var externals = {};
  if (dependencies != null) {
    for (var key in dependencies) {
      externals[key] = "commonjs " + key;
    }
  }
  return externals;
}

/** Partial RxJS imports must be mapped to module. */
function rxJsDependencies() {
  var externals = {};
  var dependencies = [
    "rxjs/Observable",
    "rxjs/Subject",
    "rxjs/BehaviorSubject",
    "rxjs/add/observable/of",
    "rxjs/add/observable/throw",
    "rxjs/add/observable/forkJoin",
    "rxjs/add/operator/catch",
    "rxjs/add/operator/filter",
    "rxjs/add/operator/switchMap",
    "rxjs/add/operator/take",
    "rxjs/add/operator/timeout",
  ];
  for (var key of dependencies) {
    externals[key] = "commonjs rxjs";
  }
  return externals;
}

module.exports = {
  // Main script for binary.
  // Additional scripts bundled with application.
  entry: {
    "dist/main": path.resolve("./src/main.ts"),
    "dist/scripts/subprocess": path.resolve("./src/scripts/subprocess.ts"),
  },
  output: {
    path: path.resolve("./"),
    filename: "[name].js",
  },
  // TypeScript sources compiled by ts-loader to ES2016.
  // Passed to Babel for transpiling to ES2015 for minification.
  module: {
    loaders: [{
      test: /\.ts$/,
      exclude: /node_modules/,
      use: [
        { loader: "babel-loader", options: { presets: ["es2015"] } },
        { loader: "ts-loader" },
      ],
    }],
  },
  resolve: {
    extensions: [".ts"],
  },
  // Target Node environment.
  // Disable filename/dirname polyfills.
  target: "node",
  node: {
    __filename: false,
    __dirname: false,
  },
  // Generate source map for bundle.
  devtool: "source-map",
  // Do not bundle Node modules.
  externals: [externalDependencies(), rxJsDependencies(), {
    // Additional external dependencies added here.
  }],
};

{'fraction_non_alphanumeric': 0.16124502691317574, 'fraction_numerical': 0.005616662766206412, 'mean_word_length': 2.9355432780847144, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6485226', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1346, 'n_words': 329}