<commit_before>const webpack = require('webpack');
const path = require('path');
const fs = require('fs');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const cheerio = require('cheerio');
const precss = require('precss');

const plugins = [
  // new webpack.NoErrorsPlugin(),
  new HtmlWebpackPlugin({
    path: '',
    inject: true,
    templateContent: template(), //eslint-disable-line no-use-before-define
  }),
  new webpack.optimize.CommonsChunkPlugin({
    name: 'vendor',
    minChunks(module) {
      // this assumes your vendor imports exist in the node_modules directory
      return module.context && module.context.indexOf('node_modules') !== -1;
    },
  }),
  // CommonChunksPlugin will now extract all the common modules from vendor and main bundles
  new webpack.optimize.CommonsChunkPlugin({
    name: 'manifest', // But since there are no more common modules between them we end up with just the runtime code included in the manifest file
  }),
  new webpack.optimize.UglifyJsPlugin({
    comments: false, // remove comments
    compress: {
      unused: true,
      dead_code: true, // big one--strip code that will never execute
      warnings: false, // good for prod apps so users can't peek behind curtain
      drop_debugger: true,
      conditionals: true,
      evaluate: true,
      drop_console: true, // strips console statements
      sequences: true,
      booleans: true,
    },
  }),
  precss,
];

module.exports = {
  entry: [
    path.join(process.cwd(), 'app/app.js'),
  ],
  output: {
    path: path.resolve(process.cwd(), 'build'),
    publicPath: '',
    filename: './[name].js',<commit_msg>Adjust production build process<commit_after>const webpack = require('webpack');
const path = require('path');
const fs = require('fs');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const cheerio = require('cheerio');
const precss = require('precss');


process.env.NODE_ENV = 'production';
const plugins = [
  // new webpack.NoErrorsPlugin(),
  new HtmlWebpackPlugin({
    path: '',
    inject: true,
    templateContent: template(), //eslint-disable-line no-use-before-define
  }),
  new webpack.optimize.CommonsChunkPlugin({
    name: 'vendor',
    minChunks(module) {
      // this assumes your vendor imports exist in the node_modules directory
      return module.context && module.context.indexOf('node_modules') !== -1;
    },
  }),
  // CommonChunksPlugin will now extract all the common modules from vendor and main bundles
  new webpack.optimize.CommonsChunkPlugin({
    name: 'manifest', // But since there are no more common modules between them we end up with just the runtime code included in the manifest file
  }),
  new webpack.optimize.UglifyJsPlugin({
    comments: false, // remove comments
    compress: {
      unused: true,
      dead_code: true, // big one--strip code that will never execute
      warnings: false, // good for prod apps so users can't peek behind curtain
      drop_debugger: true,
      conditionals: true,
      evaluate: true,
      drop_console: true, // strips console statements
      sequences: true,
      booleans: true,
    },
  }),
  precss,
  new webpack.DefinePlugin({
    'process.env': {
      'NODE_ENV': JSON.stringify('production')
  }
})
];

module.exports = {
  entry: [
    path.join(process.cwd(), 'app/app.js'),
  ],
  output: {
    path: path.resolve(process.cwd(), 'build'),
    publicPath: '',
    filename: './[name].js',
{'fraction_non_alphanumeric': 0.1279002320185615, 'fraction_numerical': 0.000580046403712297, 'mean_word_length': 3.338364779874214, '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': '3129526', 'n_tokens_mistral': 1007, 'n_tokens_neox': 996, 'n_words': 303}