<commit_before>"use strict";

let path = require('path');
let webpack = require('webpack');
let vue = require('vue-loader');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
let HtmlWebpackPlugin = require('html-webpack-plugin');
let StatsWebpackPlugin = require('stats-webpack-plugin');

module.exports = {
    entry: [],
    output: {
        path: path.join(__dirname, '/dist/'),
        publicPath: '/assets/',
        filename: '[name].bundle.js'
    },
    module: {
        loaders: [
            {
                test: /\.vue$/,
                loader: 'vue'
            },
            {
                test: /\.js$/,
                exclude: /node_modules|vue\/src|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
                loader: 'babel'
            },
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
            },
            {
                test: /\.(jpeg|jpg|png|gif|svg)$/,
                loader: 'url?limit=8192'
            },
            {
                test: /\.scss$/,
                loader: 'style!css!sass'
            }
        ]
    },
    resolve: {
        extensions: ['', '.js', '.vue']
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: 'index.html',
            inject: 'body',
            filename: 'index.html'
        }),
        new webpack.optimize.OccurenceOrderPlugin(),
        new ExtractTextPlugin('styles.css'),
        new webpack.NoErrorsPlugin()
    ],
    babel: {
        presets: ["es2015"],
        plugins: ["transform-runtime"],
        cacheDirectory: true
    },
    vue: {
        loaders: {
            css: ExtractTextPlugin.extract("css"),
            sass: ExtractTextPlugin.extract('css!sass')
        }
    }
};

if (process.env.NODE_ENV === 'production') {
    module.exports.entry = (module.exports.entry || []).concat([
        path.join(__dirname, 'src/main.js')
    ]);

    // http://vuejs.github.io/vue-loader/workflow/production.html
    module.exports.plugins = (module.exports.plugins || []).concat([
        new webpack.DefinePlugin({
            "process.env": {
                NODE_ENV: '"production"'
            }
        }),
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            }
        }),
        new StatsPlugin('webpack.stats.json', {
            source: false,
            modules: false
        })
    ])
} else {
    module.exports.debug = true;
    module.exports.devtool = 'eval-source-map';
    module.exports.entry = (module.exports.entry || []).concat([
        'webpack-hot-middleware/client?reload=true',
        path.join(__dirname, 'src/main.js')
    ]);
    module.exports.plugins = (module.exports.plugins || []).concat([
        new webpack.DefinePlugin({
            "process.env": {
                NODE_ENV: '"development"'
            }
        }),
        new webpack.HotModuleReplacementPlugin()
    ])
}
<commit_msg>[master] Update webpack.config.js<commit_after>"use strict";

let path = require('path');
let webpack = require('webpack');
let vue = require('vue-loader');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
let HtmlWebpackPlugin = require('html-webpack-plugin');
let StatsWebpackPlugin = require('stats-webpack-plugin');

module.exports = {
    entry: [],
    output: {
        path: path.join(__dirname, '/dist/'),
        publicPath: '/assets/',
        filename: '[name].bundle.js'
    },
    module: {
        loaders: [
            {
                test: /\.vue$/,
                loader: 'vue'
            },
            {
                test: /\.js$/,
                exclude: /node_modules|vue\/src|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
                loader: 'babel'
            },
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
            },
            {
                test: /\.(jpeg|jpg|png|gif|svg)$/,
                loader: 'url?limit=8192'
            },
            {
                test: /\.scss$/,
                loader: 'style!css!sass'
            }
        ]
    },
    resolve: {
        extensions: ['', '.js', '.vue']
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: 'index.html',
            inject: 'body',
            filename: 'index.html'
        }),
        new webpack.optimize.OccurenceOrderPlugin(),
        new ExtractTextPlugin('styles.css'),
        new webpack.NoErrorsPlugin()
    ],
    babel: {
        presets: ["es2015"],
        plugins: ["transform-runtime"],
        cacheDirectory: true
    },
    vue: {
        loaders: {
            css: ExtractTextPlugin.extract("css"),
            sass: ExtractTextPlugin.extract('css!sass')
        }
    }
};

if (process.env.NODE_ENV === 'production') {
    module.exports.entry = (module.exports.entry || []).concat([
        path.join(__dirname, 'src/main.js')
    ]);

    // http://vuejs.github.io/vue-loader/workflow/production.html
    module.exports.plugins = (module.exports.plugins || []).concat([
        new webpack.DefinePlugin({
            "process.env": {
                NODE_ENV: '"production"'
            }
        }),
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            }
        }),
        new StatsWebpackPlugin('webpack.stats.json', {
            source: false,
            modules: false
        })
    ])
} else {
    module.exports.debug = true;
    module.exports.devtool = 'eval-source-map';
    module.exports.entry = (module.exports.entry || []).concat([
        'webpack-hot-middleware/client?reload=true',
        path.join(__dirname, 'src/main.js')
    ]);
    module.exports.plugins = (module.exports.plugins || []).concat([
        new webpack.DefinePlugin({
            "process.env": {
                NODE_ENV: '"development"'
            }
        }),
        new webpack.HotModuleReplacementPlugin()
    ])
}

{'fraction_non_alphanumeric': 0.15727738311581035, 'fraction_numerical': 0.00264331736329093, 'mean_word_length': 1.6241872561768531, 'pattern_counts': {'":': 4, '<': 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': '4481211', 'n_tokens_mistral': 1800, 'n_tokens_neox': 1714, 'n_words': 274}