<commit_before>var config = require('./webpack.config.common'),
  glob = require("glob"),
  MiniCssExtractPlugin = require("mini-css-extract-plugin");

var distFolder = 'lib';
var extractCSS = new MiniCssExtractPlugin({fallback: "style-loader", filename: "[name]/style.css", allChunks: true});

var entries = glob.sync("./components/*/index.ts", {ignore: ['**/*.spec.tsx', '**/*.spec.ts']}).map(function(entry){ //gets the module paths in components containing index.ts and assigns them to an object
  var obj = {};
  var key = entry.split('/');
  key = key[key.length-2];

  obj[key] = entry;

  return obj;
}).reduce(function(acc, curr){

  for(var i in curr){
    acc[i] = curr[i];
  }

  return acc;
}, {});

entries['index'] = './components/index/index.ts'

config.entry = entries;

config.output = {
  path: __dirname+'/'+distFolder,
  filename: '[name]/index.js',
  library: 'mooskin',
  libraryTarget: 'umd',
  umdNamedDefine: true
};



config.module.rules.push(
      {
        test: /\.tsx?$/,
        exclude: /node_modules/,
        use: [ 
          'babel-loader'
        ]
      },
      {
        test: /\.css$/,
        exclude: /node_modules/,<commit_msg>webpack prod output fix window not defined<commit_after>var config = require('./webpack.config.common'),
  glob = require("glob"),
  MiniCssExtractPlugin = require("mini-css-extract-plugin");

var distFolder = 'lib';
var extractCSS = new MiniCssExtractPlugin({fallback: "style-loader", filename: "[name]/style.css", allChunks: true});

var entries = glob.sync("./components/*/index.ts", {ignore: ['**/*.spec.tsx', '**/*.spec.ts']}).map(function(entry){ //gets the module paths in components containing index.ts and assigns them to an object
  var obj = {};
  var key = entry.split('/');
  key = key[key.length-2];

  obj[key] = entry;

  return obj;
}).reduce(function(acc, curr){

  for(var i in curr){
    acc[i] = curr[i];
  }

  return acc;
}, {});

entries['index'] = './components/index/index.ts'

config.entry = entries;

config.output = {
  path: __dirname+'/'+distFolder,
  filename: '[name]/index.js',
  library: 'mooskin',
  libraryTarget: 'umd',
  umdNamedDefine: true,
  globalObject: 'this'
};



config.module.rules.push(
      {
        test: /\.tsx?$/,
        exclude: /node_modules/,
        use: [ 
          'babel-loader'
        ]
      },
      {
        test: /\.css$/,
        exclude: /node_modules/,
{'fraction_non_alphanumeric': 0.1882548937942524, 'fraction_numerical': 0.0008329862557267805, 'mean_word_length': 3.0642978003384096, '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': '624619', 'n_tokens_mistral': 818, 'n_tokens_neox': 803, 'n_words': 179}