<commit_before>const path = require("path");
const webpack = require("webpack");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const CheckerPlugin = require("awesome-typescript-loader").CheckerPlugin;
const bundleOutputDir = "./wwwroot/dist";
const PurifyCSSPlugin = require("purifycss-webpack");

module.exports = (env) => {
    const isDevBuild = !(env && env.prod);
    return [
        {
            stats: { modules: false },
            entry: { 'main': "./ClientApp/boot.tsx" },
            resolve: { extensions: [".js", ".jsx", ".ts", ".tsx"] },
            output: {
                path: path.join(__dirname, bundleOutputDir),
                filename: "[name].js",
                publicPath: "dist/"
            },
            module: {
                rules: [
                    { test: /\.tsx?$/, include: /ClientApp/, use: "awesome-typescript-loader?silent=true" },
                    {
                        test: /\.css$/,
                        use: isDevBuild
                            ? ["style-loader", "css-loader"]
                            : ExtractTextPlugin.extract({
                                use: [
                                    {
                                        loader: "css-loader",
                                        options: {
                                            minimize: { discardComments: { removeAll: true } }
                                        }
                                    }
                                ]
                            })
                    },
                    { test: /\.(png|jpg|jpeg|gif|svg)$/, use: "url-loader?limit=25000" }
                ]
            },
            plugins: [
                new CheckerPlugin(),
                new webpack.DllReferencePlugin({
                    context: __dirname,
                    manifest: require("./wwwroot/dist/vendor-manifest.json")
                })
            ].concat(isDevBuild
                ? [
                    new webpack.SourceMapDevToolPlugin({
                        filename: "[file].map",
                        moduleFilenameTemplate:
                            path.relative(bundleOutputDir,
                                "[resourcePath]")
                    })
                ]
                : [
                    new webpack.optimize.UglifyJsPlugin({
                        output: {
                            comments: false
                        }
                    }),
                    new ExtractTextPlugin("site.css"),
                    new ExtractTextPlugin("vendor.css"),
                    new PurifyCSSPlugin({
                        paths: glob.sync([
                            path.join(__dirname, "dist/*.html"),
                            path.join(__dirname, "src/**/*.js")
                        ]),
                        moduleExtensions: [".js"]
                    })
                ])
        }
    ];
};<commit_msg>Revert "retry last"<commit_after>const path = require("path");
const webpack = require("webpack");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const CheckerPlugin = require("awesome-typescript-loader").CheckerPlugin;
const bundleOutputDir = "./wwwroot/dist";
const PurifyCSSPlugin = require("purifycss-webpack");

module.exports = (env) => {
    const isDevBuild = !(env && env.prod);
    return [
        {
            stats: { modules: false },
            entry: { 'main': "./ClientApp/boot.tsx" },
            resolve: { extensions: [".js", ".jsx", ".ts", ".tsx"] },
            output: {
                path: path.join(__dirname, bundleOutputDir),
                filename: "[name].js",
                publicPath: "dist/"
            },
            module: {
                rules: [
                    { test: /\.tsx?$/, include: /ClientApp/, use: "awesome-typescript-loader?silent=true" },
                    {
                        test: /\.css$/,
                        use: isDevBuild
                            ? ["style-loader", "css-loader"]
                            : ExtractTextPlugin.extract({
                                use: [
                                    {
                                        loader: "css-loader",
                                        options: {
                                            minimize: { discardComments: { removeAll: true } }
                                        }
                                    }
                                ]
                            })
                    },
                    { test: /\.(png|jpg|jpeg|gif|svg)$/, use: "url-loader?limit=25000" }
                ]
            },
            plugins: [
                new CheckerPlugin(),
                new webpack.DllReferencePlugin({
                    context: __dirname,
                    manifest: require("./wwwroot/dist/vendor-manifest.json")
                })
            ].concat(isDevBuild
                ? [
                    new webpack.SourceMapDevToolPlugin({
                        filename: "[file].map",
                        moduleFilenameTemplate:
                            path.relative(bundleOutputDir,
                                "[resourcePath]")
                    })
                ]
                : [
                    new webpack.optimize.UglifyJsPlugin({
                        output: {
                            comments: false
                        }
                    }),
                    new ExtractTextPlugin("site.css"),
                    new ExtractTextPlugin("vendor.css"),
                    new PurifyCSSPlugin({
                        paths: globAll.sync([
                            path.join(__dirname, "dist/*.html"),
                            path.join(__dirname, "src/**/*.js")
                        ]),
                        moduleExtensions: [".js"]
                    })
                ])
        }
    ];
};
{'fraction_non_alphanumeric': 0.11514644351464436, 'fraction_numerical': 0.0016736401673640166, 'mean_word_length': 0.8786545111600126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4653585', 'n_tokens_mistral': 1378, 'n_tokens_neox': 1274, 'n_words': 218}