<commit_before>var webpack = require('webpack');
var path = require('path');
var glob = require('glob');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
var debug = process.env.NODE_ENV !== 'production'

var plugins = [
    new webpack.NoErrorsPlugin(),
    new webpack.optimize.OccurenceOrderPlugin(),
    new ExtractTextPlugin('css/[name].css')
]

if (debug) {
    //DEVELOPMENT
    plugins.push(
        new webpack.HotModuleReplacementPlugin({
            multiStep: true
        })
    );
} else {
    // PRODUCTION
    plugins.push(
        new webpack.optimize.DedupePlugin(),
        new webpack.optimize.UglifyJsPlugin({
            dropDebugger: true,
            dropConsole: true,
            compress: {
                warnings: false,
            },
            output: {
                comments: false,
            }
        })
    );
}
var config = module.exports = {

    cache: true,
    debug: debug,
    //devtool: debug ? 'eval' : 'source-map',
    entry: {
        main: './index.js'
    },
    output: {
        filename: 'js/[name].js',
        path: path.join(__dirname, 'build'),
        publicPath: './'
    },
    module: {
        loaders: [{
            test: /\.css$/,
            loader: ExtractTextPlugin.extract('style', 'css')
        }, {
            test: /\.html$/,
            loader: "html?-minimize" //避免壓縮HTML
        }, {
            test: /\.(svg|png|gif|jpe?g|JPE?G)$/,
            loader: 'url?limit=8192&name=imgs/[name].[ext]'
        }]
    },
    resolve: {
        root: [path.resolve('./src')],
    },
    plugins: plugins
};


var pages = Object.keys(getEntry('src/views/*.html'));<commit_msg>change img limt<commit_after>var webpack = require('webpack');
var path = require('path');
var glob = require('glob');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
var debug = process.env.NODE_ENV !== 'production'

var plugins = [
    new webpack.NoErrorsPlugin(),
    new webpack.optimize.OccurenceOrderPlugin(),
    new ExtractTextPlugin('css/[name].css')
]

if (debug) {
    //DEVELOPMENT
    plugins.push(
        new webpack.HotModuleReplacementPlugin({
            multiStep: true
        })
    );
} else {
    // PRODUCTION
    plugins.push(
        new webpack.optimize.DedupePlugin(),
        new webpack.optimize.UglifyJsPlugin({
            dropDebugger: true,
            dropConsole: true,
            compress: {
                warnings: false,
            },
            output: {
                comments: false,
            }
        })
    );
}
var config = module.exports = {

    cache: true,
    debug: debug,
    //devtool: debug ? 'eval' : 'source-map',
    entry: {
        main: './index.js'
    },
    output: {
        filename: 'js/[name].js',
        path: path.join(__dirname, 'build'),
        publicPath: './'
    },
    module: {
        loaders: [{
            test: /\.css$/,
            loader: ExtractTextPlugin.extract('style', 'css')
        }, {
            test: /\.html$/,
            loader: "html?-minimize" //避免壓縮HTML
        }, {
            test: /\.(svg|png|gif|jpe?g|JPE?G)$/,
            loader: 'url?limit=1&name=imgs/[name].[ext]'
        }]
    },
    resolve: {
        root: [path.resolve('./src')],
    },
    plugins: plugins
};


var pages = Object.keys(getEntry('src/views/*.html'));
{'fraction_non_alphanumeric': 0.15675218494502396, 'fraction_numerical': 0.00140964195094446, 'mean_word_length': 1.9690376569037658, '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': '5786520', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1100, 'n_words': 201}