<commit_before>var path = require('path'); // Webpack Config needs this line to make sure the filepath is absolute. It is needed mostly for webpack-dev-server usage. (https://github.com/webpack-contrib/awesome-webpack#table-of-contents)
var webpack = require('webpack'); // Needed for Plugins that use Webpack
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CleanWebpackPlugin = require('clean-webpack-plugin');
var glob = require('glob'); // Goes with Purify (and does not require an npm install)
var PurifyCSSPlugin = require('purifycss-webpack');
var SpriteLoaderPlugin = require('svg-sprite-loader/plugin'); // You must use this with Sprite Loader if you want it to extract to a new location.

module.exports = env => { // You may use an Object ( take out: "env => { return" ) or an ES6/ES2015 function so that we can pass the env parameter.
    
    // Create Plugins variable to hold production vs development plugins.
    var plugins = env.prod
        ?   [ // When in Production
                //new webpack.optimize.UglifyJsPlugin({
                    //Change settings here so that non dev one is debuggable
                //}),
            ]
        :   [ // When in Development
                new webpack.HotModuleReplacementPlugin() // Activating HMR
            ];
            
    // Pushing Plugins that are used in both dev and prod.
    plugins.push(
        new ExtractTextPlugin( env.prod ? "assets/css/styles.[contenthash:10].min.css" : "assets/css/styles.css" ), // Name and Destination. Note that "[contenthash:10]" is only available on ExtractTextPlugin
        //new PurifyCSSPlugin({ // Make sure this is after ExtractTextPlugin!
            // Give paths to parse for rules. These should be absolute!
            //paths: glob.sync(path.join(__dirname, 'src/*.html')),
        //}),
        new HtmlWebpackPlugin({<commit_msg>In case you require something simpler!<commit_after>var path = require('path'); // Webpack Config needs this line to make sure the filepath is absolute. It is needed mostly for webpack-dev-server usage. (https://github.com/webpack-contrib/awesome-webpack#table-of-contents)
var webpack = require('webpack'); // Needed for Plugins that use Webpack
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CleanWebpackPlugin = require('clean-webpack-plugin');
var glob = require('glob'); // Goes with Purify (and does not require an npm install)
var PurifyCSSPlugin = require('purifycss-webpack');
var SpriteLoaderPlugin = require('svg-sprite-loader/plugin'); // You must use this with Sprite Loader if you want it to extract to a new location.

// For most usecases you can use Parcel.

module.exports = env => { // You may use an Object ( take out: "env => { return" ) or an ES6/ES2015 function so that we can pass the env parameter.
    
    // Create Plugins variable to hold production vs development plugins.
    var plugins = env.prod
        ?   [ // When in Production
                //new webpack.optimize.UglifyJsPlugin({
                    //Change settings here so that non dev one is debuggable
                //}),
            ]
        :   [ // When in Development
                new webpack.HotModuleReplacementPlugin() // Activating HMR
            ];
            
    // Pushing Plugins that are used in both dev and prod.
    plugins.push(
        new ExtractTextPlugin( env.prod ? "assets/css/styles.[contenthash:10].min.css" : "assets/css/styles.css" ), // Name and Destination. Note that "[contenthash:10]" is only available on ExtractTextPlugin
        //new PurifyCSSPlugin({ // Make sure this is after ExtractTextPlugin!
            // Give paths to parse for rules. These should be absolute!
            //paths: glob.sync(path.join(__dirname, 'src/*.html')),
        //}),
        new HtmlWebpackPlugin({
{'fraction_non_alphanumeric': 0.10724269377382466, 'fraction_numerical': 0.00457433290978399, 'mean_word_length': 2.762906309751434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2311061', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1028, 'n_words': 379}