<commit_before>const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextWebpackPlugin = require('extract-text-webpack-plugin');
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin');
const OfflinePlugin = require('offline-plugin');
const WebpackDashboardPlugin = require('webpack-dashboard/plugin');

const { isDevelopment, port } = require('./configuration');

const baseEntry = [
  'babel-polyfill',
  'normalize.css',
  'raleway-webfont/raleway.css',
  'roboto-mono-webfont/roboto-mono.css',
  './src/shared/assets/avatar.jpg',
  './src/shared/assets/images',
  './src/client/index.jsx',
];
const devEntry = [
  'react-hot-loader/patch',
  `webpack-dev-server/client?http://localhost:${port}`,
  'webpack/hot/only-dev-server',
];
const entry = isDevelopment ? devEntry.concat(baseEntry) : baseEntry;

const basePlugins = [
  new webpack.EnvironmentPlugin(['NODE_ENV']),
  new CopyWebpackPlugin([{ from: 'src/shared/assets/favicon' }]),
  new HtmlWebpackPlugin({
    filename: isDevelopment ? 'index.html' : '../build/index.html',
    template: 'src/shared/index.html',
    inject: 'body',
    minify: { collapseWhitespace: true },
  }),
  new ExtractTextWebpackPlugin('[name].[hash].css'),
  new StyleExtHtmlWebpackPlugin({ minify: true }),
];
const devPlugins = [
  new webpack.HotModuleReplacementPlugin(),
  new webpack.NamedModulesPlugin(),
  new WebpackDashboardPlugin(),
];
const prodPlugins = [
  new webpack.LoaderOptionsPlugin({ minimize: true, debug: false }),
  new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }),
  new OfflinePlugin({
    publicPath: '/',
    relativePaths: false,
    caches: {
      main: [':rest:'],
      additional: [':externals'],
      optional: ['*.chunk.js'],
    },
    AppCache: false,
  }),
];
const plugins = basePlugins.concat(isDevelopment ? devPlugins : prodPlugins);
<commit_msg>Remove optional caches<commit_after>const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextWebpackPlugin = require('extract-text-webpack-plugin');
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin');
const OfflinePlugin = require('offline-plugin');
const WebpackDashboardPlugin = require('webpack-dashboard/plugin');

const { isDevelopment, port } = require('./configuration');

const baseEntry = [
  'babel-polyfill',
  'normalize.css',
  'raleway-webfont/raleway.css',
  'roboto-mono-webfont/roboto-mono.css',
  './src/shared/assets/avatar.jpg',
  './src/shared/assets/images',
  './src/client/index.jsx',
];
const devEntry = [
  'react-hot-loader/patch',
  `webpack-dev-server/client?http://localhost:${port}`,
  'webpack/hot/only-dev-server',
];
const entry = isDevelopment ? devEntry.concat(baseEntry) : baseEntry;

const basePlugins = [
  new webpack.EnvironmentPlugin(['NODE_ENV']),
  new CopyWebpackPlugin([{ from: 'src/shared/assets/favicon' }]),
  new HtmlWebpackPlugin({
    filename: isDevelopment ? 'index.html' : '../build/index.html',
    template: 'src/shared/index.html',
    inject: 'body',
    minify: { collapseWhitespace: true },
  }),
  new ExtractTextWebpackPlugin('[name].[hash].css'),
  new StyleExtHtmlWebpackPlugin({ minify: true }),
];
const devPlugins = [
  new webpack.HotModuleReplacementPlugin(),
  new webpack.NamedModulesPlugin(),
  new WebpackDashboardPlugin(),
];
const prodPlugins = [
  new webpack.LoaderOptionsPlugin({ minimize: true, debug: false }),
  new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }),
  new OfflinePlugin({
    publicPath: '/',
    relativePaths: false,
    caches: {
      main: [':rest:'],
      additional: [':externals'],
    },
    AppCache: false,
  }),
];
const plugins = basePlugins.concat(isDevelopment ? devPlugins : prodPlugins);

{'fraction_non_alphanumeric': 0.16279069767441862, 'fraction_numerical': 0.0, 'mean_word_length': 4.891016200294551, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3795313', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1273, 'n_words': 228}