<commit_before>﻿'use strict';

const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin');

module.exports = {
    entry: './app/index.ts',
    output: {
        path: './wwwroot/build',
        filename: 'bundle.js'
    },
    resolve: {
        modules: ['node_modules'],
        extensions: ['.ts', '.js', '.css', '.scss']
    },
    module: {
        rules: [
            {
                test: /\.ts$/,
                loader: 'ts-loader'
            },
            {
                test: /\.(css|scss)$/,
                use: [
                    'to-string-loader',
                    ExtractTextPlugin.extract({
                        fallback: 'style-loader',
                        loader: 'css-loader?sourceMap&minimize!sass-loader?sourceMap'
                    })
                ]
            },
            {
                test: /\.html$/,
                loader: "raw-loader"
            },
            {
                test: /\.woff2?$|\.ttf$|\.eot$|\.svg$|\.png|\.jpe?g|\.gif$/,
                loader: 'file-loader'
            }
        ]
    },
    devtool: 'source-map',
    plugins: [
        new CleanWebpackPlugin(['./wwwroot/build/', './app/**/*.js', './app/**/*.map'], {
            verbose: false
        }),
        new UglifyJsPlugin({
            sourceMap: true
        }),
        new ExtractTextPlugin({
            filename: 'styles.css',
            disable: false,
            allChunks: true
        })
    ]
};<commit_msg>more minification for bundle<commit_after>﻿'use strict';

const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin');

module.exports = {
    entry: './app/index.ts',
    output: {
        path: './wwwroot/build',
        filename: 'bundle.js'
    },
    resolve: {
        modules: ['node_modules'],
        extensions: ['.ts', '.js', '.css', '.scss']
    },
    module: {
        rules: [
            {
                test: /\.ts$/,
                loader: 'ts-loader'
            },
            {
                test: /\.(css|scss)$/,
                use: [
                    'to-string-loader',
                    ExtractTextPlugin.extract({
                        fallback: 'style-loader',
                        loader: 'css-loader?sourceMap&minimize!sass-loader?sourceMap'
                    })
                ]
            },
            {
                test: /\.html$/,
                loader: "raw-loader"
            },
            {
                test: /\.woff2?$|\.ttf$|\.eot$|\.svg$|\.png|\.jpe?g|\.gif$/,
                loader: 'file-loader'
            }
        ]
    },
    devtool: 'source-map',
    plugins: [
        new CleanWebpackPlugin(['./wwwroot/build/', './app/**/*.js', './app/**/*.map'], {
            verbose: false,
            dry: false
        }),
        new UglifyJsPlugin({
            minimize: true,
            sourceMap: true,
            output: {
                comments: false
            },
            compressor: {
                warnings: false
            }
        }),
        new ExtractTextPlugin({
            filename: 'styles.css',
            disable: false,
            allChunks: true
        })
    ]
};
{'fraction_non_alphanumeric': 0.15834063686824423, 'fraction_numerical': 0.0005842827928717499, 'mean_word_length': 1.1892583120204603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '1185897', 'n_tokens_mistral': 999, 'n_tokens_neox': 954, 'n_words': 155}