<commit_before>const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
    entry: {
        admin : './html/js/src/admin.js',
        public : './html/js/src/public.js',
    },
    output: {
        path: path.resolve(__dirname, './html'),
        // only for JS files
        filename: 'js/[name].min.js',
    },
    module: {
        rules: [
            {
                test: /\.vue$/,
                loader: 'vue-loader',
                options: {
                    loaders: {
                        // configuration for SCSS within .vue files
                        'scss': 'vue-style-loader!css-loader!sass-loader'
                    }
                    // other vue-loader options go here
                }
            },
            {
                test: /\.js$/,
                loader: 'babel-loader',
                exclude: /node_modules/,
            },
            {
                test: /\.scss$/,
                exclude: /node_modules/,
                loader: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: [
                        {
                            loader: 'css-loader',
                            options: {
                                sourceMap: true
                            }
                        },
                        {
                            loader: 'postcss-loader'
                        },
                        {
                            loader: 'sass-loader',
                            options: {
                                // outputStyle: 'compressed',
                                sourceMap: true,
                                sourceMapContents: true
                            }
                        }
                    ]
                })
            },
            {
                test: /\.css$/,
                loader: "style-loader!css-loader"
            }
        ]
    },
    plugins: [
        // always uglify so we're actually testing real world code in the browser
        new webpack.optimize.UglifyJsPlugin({
            sourceMap: true,
            compress: {
                warnings: false
            }
        }),
        // only for files that use this plugin (only SASS/CSS atm)
        new ExtractTextPlugin('css/[name].css')
    ],
    resolve: {
        alias: {
            // see: https://github.com/vuejs/vue/blob/dev/dist/README.md
            // can't use runtime version because we have inline-templates
            'vue$': 'vue/dist/vue.common.js',
        }
    },
    devtool: 'cheap-module-eval-source-map'
};

if (process.env.NODE_ENV === 'production') {
    module.exports.devtool = 'source-map';

    // see https://github.com/vuejs-templates/webpack-simple/blob/master/template/webpack.config.js
    module.exports.plugins = (module.exports.plugins || []).concat([
        new webpack.LoaderOptionsPlugin({
            minimize: true
        })
    ]);
}<commit_msg>add exts for webpack to resolve automatically<commit_after>const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
    entry: {
        admin : './html/js/src/admin.js',
        public : './html/js/src/public.js',
    },
    output: {
        path: path.resolve(__dirname, './html'),
        // only for JS files
        filename: 'js/[name].min.js',
    },
    module: {
        rules: [
            {
                test: /\.vue$/,
                loader: 'vue-loader',
                options: {
                    loaders: {
                        // configuration for SCSS within .vue files
                        'scss': 'vue-style-loader!css-loader!sass-loader'
                    }
                    // other vue-loader options go here
                }
            },
            {
                test: /\.js$/,
                loader: 'babel-loader',
                exclude: /node_modules/,
            },
            {
                test: /\.scss$/,
                exclude: /node_modules/,
                loader: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: [
                        {
                            loader: 'css-loader',
                            options: {
                                sourceMap: true
                            }
                        },
                        {
                            loader: 'postcss-loader'
                        },
                        {
                            loader: 'sass-loader',
                            options: {
                                // outputStyle: 'compressed',
                                sourceMap: true,
                                sourceMapContents: true
                            }
                        }
                    ]
                })
            },
            {
                test: /\.css$/,
                loader: "style-loader!css-loader"
            }
        ]
    },
    plugins: [
        // always uglify so we're actually testing real world code in the browser
        new webpack.optimize.UglifyJsPlugin({
            sourceMap: true,
            compress: {
                warnings: false
            }
        }),
        // only for files that use this plugin (only SASS/CSS atm)
        new ExtractTextPlugin('css/[name].css')
    ],
    resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
            // see: https://github.com/vuejs/vue/blob/dev/dist/README.md
            // can't use runtime version because we have inline-templates
            'vue$': 'vue/dist/vue.common.js',
        }
    },
    devtool: 'cheap-module-eval-source-map'
};

if (process.env.NODE_ENV === 'production') {
    module.exports.devtool = 'source-map';

    // see https://github.com/vuejs-templates/webpack-simple/blob/master/template/webpack.config.js
    module.exports.plugins = (module.exports.plugins || []).concat([
        new webpack.LoaderOptionsPlugin({
            minimize: true
        })
    ]);
}
{'fraction_non_alphanumeric': 0.11718246292714378, 'fraction_numerical': 0.0, 'mean_word_length': 0.9710927573062261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '4466847', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1499, 'n_words': 296}