<commit_before>'use strict';

var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');

var isProd = process.env.NODE_ENV === 'production';

module.exports = (function makeWebpackConfig() {
	var config = {};

	/**
	 * Configuration begins here
	 * Reference: http://webpack.github.io/docs/configuration.html
	 */

	// Cache generated modules and chunks to improve performance for multiple incremental builds.
	// Reference: http://webpack.github.io/docs/configuration.html#cache
	config.cache = true;

	// Mapping entry point
	// More: https://github.com/webpack/webpack/issues/1189
	config.entry = {
		// This will map entry point to destination path related to output.path
		'dist/app': './src/app/app.js'
	};

	// Options affecting the output of the compilation.
	// Reference: http://webpack.github.io/docs/configuration.html#output
	// Additional notes:
	// http://webpack.github.io/docs/long-term-caching.html
	// https://medium.com/@okonetchnikov/long-term-caching-of-static-assets-with-webpack-1ecb139adb95
	config.output = {
		path: path.resolve(__dirname, 'dist'),
		publicPath: './',
		filename: isProd ? '[name].[chunkhash].js' : '[name].bundle.js',
		// This is probably a bug, since chunks doesn't respect entry mapping in config
		chunkFilename: isProd ? 'dist/[name].[chunkhash].js' : 'dist/[name].bundle.js'
	};

	// Choose a developer tool to enhance debugging.
	// Reference: http://webpack.github.io/docs/configuration.html#devtool
	config.devtool = 'source-map';

	/**
	 * Loaders definition
	 * Reference: http://webpack.github.io/docs/configuration.html#module-loaders
	 * List: http://webpack.github.io/docs/list-of-loaders.html
	 * This handles most of the magic responsible for converting modules
	 */

	config.module = {
		preLoaders: [],
		loaders: [{
			// JS LOADER
			// Reference: https://github.com/babel/babel-loader
			// Transpile .js files using babel-loader (compile ES6 and ES7 into ES5 code)
			test: /\.js$/,
			exclude: /node_modules/,
			// We may use ng-annotate module later
			// Reference: https://github.com/jeffling/ng-annotate-webpack-plugin
			loader: [/*'ng-annotate',*/ 'babel'],
			query: {
				// By default Babel is injecting helpers into each file that requires it.
				// Require the babel runtime as a separate module to avoid the duplication.
				// Reference: https://github.com/babel/babel-loader#babel-is-injecting-helpers-into-each-file-and-bloating-my-code
				plugins: ['transform-runtime']
			}
		},
		{
			test: /\.scss$/,
			// STYLE LOADER
			// Reference: https://github.com/webpack-contrib/style-loader
			// CSS LOADER
			// Reference: https://github.com/webpack-contrib/css-loader
			// SASS LOADER
			// Reference: https://github.com/webpack-contrib/sass-loader
			loader: 'style-loader!css-loader!sass-loader'
		},
		{
			test: /\.css$/,
			// STYLE LOADER
			// Reference: https://github.com/webpack-contrib/style-loader
			// CSS LOADER
			// Reference: https://github.com/webpack-contrib/css-loader
			loader: 'style-loader!css-loader'
		},
		{
			// HTML LOADER
			// Reference: https://github.com/webpack/raw-loader
			// Allow loading html through js
			test: /\.html$/,
			exclude: /node_modules/,<commit_msg>Cleanup webpack config.<commit_after>'use strict';

var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');

var isProd = process.env.NODE_ENV === 'production';

module.exports = (function makeWebpackConfig() {
	var config = {};

	/**
	 * Configuration begins here
	 * Reference: http://webpack.github.io/docs/configuration.html
	 */

	// Cache generated modules and chunks to improve performance for multiple incremental builds.
	// Reference: http://webpack.github.io/docs/configuration.html#cache
	config.cache = true;

	// Mapping entry point
	// More: https://github.com/webpack/webpack/issues/1189
	config.entry = {
		// This will map entry point to destination path related to output.path
		'dist/app': './src/app/app.js'
	};

	// Options affecting the output of the compilation.
	// Reference: http://webpack.github.io/docs/configuration.html#output
	// Additional notes:
	// http://webpack.github.io/docs/long-term-caching.html
	// https://medium.com/@okonetchnikov/long-term-caching-of-static-assets-with-webpack-1ecb139adb95
	config.output = {
		path: path.resolve(__dirname, 'dist'),
		publicPath: './',
		filename: isProd ? '[name].[chunkhash].js' : '[name].bundle.js',
		// This is probably a bug, since chunks doesn't respect entry mapping in config
		chunkFilename: isProd ? 'dist/[name].[chunkhash].js' : 'dist/[name].bundle.js'
	};

	// Choose a developer tool to enhance debugging.
	// Reference: http://webpack.github.io/docs/configuration.html#devtool
	config.devtool = 'source-map';

	/**
	 * Loaders definition
	 * Reference: http://webpack.github.io/docs/configuration.html#module-loaders
	 * List: http://webpack.github.io/docs/list-of-loaders.html
	 * This handles most of the magic responsible for converting modules
	 */

	config.module = {
		preLoaders: [],
		loaders: [{
			// JS LOADER
			// Reference: https://github.com/babel/babel-loader
			// Transpile .js files using babel-loader (compile ES6 and ES7 into ES5 code)
			test: /\.js$/,
			exclude: /node_modules/,
			// We may use ng-annotate module later
			// Reference: https://github.com/jeffling/ng-annotate-webpack-plugin
			loader: 'babel',
			query: {
				// By default Babel is injecting helpers into each file that requires it.
				// Require the babel runtime as a separate module to avoid the duplication.
				// Reference: https://github.com/babel/babel-loader#babel-is-injecting-helpers-into-each-file-and-bloating-my-code
				plugins: ['transform-runtime']
			}
		},
		{
			test: /\.scss$/,
			// STYLE LOADER
			// Reference: https://github.com/webpack-contrib/style-loader
			// CSS LOADER
			// Reference: https://github.com/webpack-contrib/css-loader
			// SASS LOADER
			// Reference: https://github.com/webpack-contrib/sass-loader
			loader: 'style-loader!css-loader!sass-loader'
		},
		{
			test: /\.css$/,
			// STYLE LOADER
			// Reference: https://github.com/webpack-contrib/style-loader
			// CSS LOADER
			// Reference: https://github.com/webpack-contrib/css-loader
			loader: 'style-loader!css-loader'
		},
		{
			// HTML LOADER
			// Reference: https://github.com/webpack/raw-loader
			// Allow loading html through js
			test: /\.html$/,
			exclude: /node_modules/,
{'fraction_non_alphanumeric': 0.15288683602771364, 'fraction_numerical': 0.004003079291762895, 'mean_word_length': 3.2072538860103625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 22, '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': '2050248', 'n_tokens_mistral': 2258, 'n_tokens_neox': 2005, 'n_words': 460}