<commit_before>'use strict';

const webpack = require('webpack');
const path = require('path');
const JsonpTemplatePlugin = webpack.JsonpTemplatePlugin;
const FunctionModulePlugin = require('webpack/lib/FunctionModulePlugin');
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');

const opt = {
  path: path.resolve('./bundle/js'),
  filename: 'main.js',
  libraryTarget: 'commonjs2'
};

let webpackConfig = {
  resolve: {
    extensions: ['', '.js', '.jsx', '.json'],
    packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
  },
  entry: ['./scripts/main.js'],
  output: opt,
  externals: ['electron', 'nicolive'],
  plugins: [
    new webpack.NoErrorsPlugin(),
    new NodeTargetPlugin()
  ],
  module: {
    loaders: [ {
      test: /\.jsx?$/,
      loader: 'babel-loader',
      exclude: /node_modules/,
    }, {
      test: /\.json$/,
      loader: 'json-loader'
    }, ]
  }
};

webpackConfig.target = function renderer (compiler) {
  compiler.apply(
    new JsonpTemplatePlugin(opt),
    new FunctionModulePlugin(opt)
  );
};

module.exports = webpackConfig;<commit_msg>Change: Include electron module to build of webpack<commit_after>'use strict';

const webpack = require('webpack');
const path = require('path');
const JsonpTemplatePlugin = webpack.JsonpTemplatePlugin;
const FunctionModulePlugin = require('webpack/lib/FunctionModulePlugin');
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');

const opt = {
  path: path.resolve('./bundle/js'),
  filename: 'main.js',
  libraryTarget: 'commonjs2'
};

let webpackConfig = {
  resolve: {
    extensions: ['', '.js', '.jsx', '.json'],
    packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
  },
  entry: ['./scripts/main.js'],
  output: opt,
  externals: ['nicolive'],
  plugins: [
    new webpack.NoErrorsPlugin(),
    new NodeTargetPlugin(),
    new webpack.ExternalsPlugin('commonjs', ['electron'])
  ],
  module: {
    loaders: [ {
      test: /\.jsx?$/,
      loader: 'babel-loader',
      exclude: /node_modules/,
    }, {
      test: /\.json$/,
      loader: 'json-loader'
    }, ]
  }
};

webpackConfig.target = function renderer (compiler) {
  compiler.apply(
    new JsonpTemplatePlugin(opt),
    new FunctionModulePlugin(opt)
  );
};

module.exports = webpackConfig;
{'fraction_non_alphanumeric': 0.17586649550706032, 'fraction_numerical': 0.0008557980316645272, 'mean_word_length': 3.8008213552361396, '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': '6769248', 'n_tokens_mistral': 753, 'n_tokens_neox': 742, 'n_words': 158}