<commit_before>/* eslint-disable import/no-commonjs */

const __DEV__ = process.env.NODE_ENV !== 'production';

const webpack = require('webpack');
const path = require('path');
const fs = require('fs');

const plugins = [
	new webpack.EnvironmentPlugin('NODE_ENV'),
	new webpack.LoaderOptionsPlugin({
		minimize: !__DEV__,
		debug: __DEV__
	}),
];

const entry = [
	'./src/start/heyneighbor-client',
];

const babelrc = JSON.parse(fs.readFileSync(path.join(__dirname, '.babelrc'), 'utf-8').toString());

module.exports = {
	devtool: 'source-map',
	entry: __DEV__ ? [ ...entry, 'webpack-hot-middleware/client' ] : [ ...entry ],
	output: {
		path: path.resolve(__dirname, 'static/dist/scripts'),
		publicPath: '/dist/scripts',
		filename: 'bundle.min.js',
		sourceMapFilename: 'bundle.min.js.map'
	},
	plugins: [ ...plugins, __DEV__ ? new webpack.HotModuleReplacementPlugin() : new webpack.optimize.UglifyJsPlugin() ],
	resolve: {
		extensions: [ '', '.web.js', '.js' ],
	},
	module: {
		preLoaders: [
			{
				test: /\.js$/,
				loader: 'eslint?quiet=true',
				exclude: /node_modules/
			}
		],
		loaders: [<commit_msg>Use Dedupe plugin for webpack<commit_after>/* eslint-disable import/no-commonjs */

const __DEV__ = process.env.NODE_ENV !== 'production';

const webpack = require('webpack');
const path = require('path');
const fs = require('fs');

const plugins = [
	new webpack.EnvironmentPlugin('NODE_ENV'),
	new webpack.LoaderOptionsPlugin({
		minimize: !__DEV__,
		debug: __DEV__
	}),
];

const entry = [
	'./src/start/heyneighbor-client',
];

const babelrc = JSON.parse(fs.readFileSync(path.join(__dirname, '.babelrc'), 'utf-8').toString());

module.exports = {
	devtool: 'source-map',
	entry: __DEV__ ? [ ...entry, 'webpack-hot-middleware/client' ] : [ ...entry ],
	output: {
		path: path.resolve(__dirname, 'static/dist/scripts'),
		publicPath: '/dist/scripts',
		filename: 'bundle.min.js',
		sourceMapFilename: 'bundle.min.js.map'
	},
	plugins: plugins.concat(__DEV__ ? [
		new webpack.HotModuleReplacementPlugin(),
	] : [
		new webpack.optimize.DedupePlugin(),
		new webpack.optimize.UglifyJsPlugin()
	]),
	resolve: {
		extensions: [ '', '.web.js', '.js' ],
	},
	module: {
		preLoaders: [
			{
				test: /\.js$/,
				loader: 'eslint?quiet=true',
				exclude: /node_modules/
			}
		],
		loaders: [
{'fraction_non_alphanumeric': 0.18744588744588744, 'fraction_numerical': 0.0008658008658008658, 'mean_word_length': 4.023913043478261, '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': '4466846', 'n_tokens_mistral': 879, 'n_tokens_neox': 816, 'n_words': 149}