<commit_before>var webpack = require("webpack");
var libraryName = require("./package.json").name;
var withLocalesSuffix = "-i18n";

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
  mode: "production",
  entry: {
    [libraryName]: "./src/cronstrue.ts",
    [libraryName + ".min"]: "./src/cronstrue.ts",
    [libraryName + withLocalesSuffix]: "./src/cronstrue-i18n.ts",
    [libraryName + withLocalesSuffix + ".min"]: "./src/cronstrue-i18n.ts"
  },
  output: {
    path: __dirname + "/dist",
    filename: "[name].js",
    library: libraryName,
    libraryTarget: "umd"
  },
  resolve: {
    extensions: [".js", ".ts"]
  },
  module: {
    /*
         * Each loader needs an associated Regex test that goes through each
         * of the files you've included (or in this case, all files but the
         * ones in the excluded directories) and finds all files that pass
         * the test. Then it will apply the loader to that file. I haven't<commit_msg>Remove window refernece in UMD build<commit_after>var webpack = require("webpack");
var libraryName = require("./package.json").name;
var withLocalesSuffix = "-i18n";

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
  mode: "production",
  entry: {
    [libraryName]: "./src/cronstrue.ts",
    [libraryName + ".min"]: "./src/cronstrue.ts",
    [libraryName + withLocalesSuffix]: "./src/cronstrue-i18n.ts",
    [libraryName + withLocalesSuffix + ".min"]: "./src/cronstrue-i18n.ts"
  },
  output: {
    path: __dirname + "/dist",
    filename: "[name].js",
    library: libraryName,
    libraryTarget: "umd",
    // Workaround for webpack 4 umd bug (Ref: https://github.com/webpack/webpack/issues/6522)
    globalObject: "typeof self !== 'undefined' ? self : this"
  },
  resolve: {
    extensions: [".js", ".ts"]
  },
  module: {
    /*
         * Each loader needs an associated Regex test that goes through each
         * of the files you've included (or in this case, all files but the
         * ones in the excluded directories) and finds all files that pass
         * the test. Then it will apply the loader to that file. I haven't
{'fraction_non_alphanumeric': 0.14550509731232622, 'fraction_numerical': 0.007877664504170528, 'mean_word_length': 3.1123809523809522, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5129298', 'n_tokens_mistral': 701, 'n_tokens_neox': 685, 'n_words': 200}