<commit_before>const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');

const config = {
    entry: {
        'src/main.js': [
            'babel-polyfill',
            './src/main.js',
        ],
    },

    output: (() => {
        let output = {};

        if (process.env.NODE_ENV === 'production') {
            output = Object.assign({}, output, {
                path: path.resolve(__dirname, 'dist'),
                publicPath: '',
                filename: '[name][chunkhash].js',
            });
        } else {
            output = Object.assign({}, output, {
                path: '/',
                publicPath: 'http://localhost:3000/',
                filename: '[name]',
            });
        }

        return output;
    })(),

    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: [
                    /(node_modules)/,
                    /(packages\/react-accessible-tooltip)/,
                ],
                use: [
                    'babel-loader',
                    'eslint-loader',
                ],
            },
            {
                test: /\.scss$/,
                use: [
                    'style-loader',
                    'css-loader',
                    {
                        loader: 'postcss-loader',
                        options: {
                            plugins() {
                                return [
                                    autoprefixer({
                                        browsers: [
                                            'last 2 versions',
                                            'ie >= 10',
                                        ],
                                    }),
                                    cssnano,
                                ];
                            },
                        },
                    },
                    'sass-loader',
                ],
            },
            {
                test: /\.html$/,
                loader: 'html-loader',
            },
        ],
    },

    plugins: (() => {
        // Generate a root HTML file with a <script> appended to the <body> tag.
        let plugins = [
            new HtmlWebpackPlugin({
                template: 'src/index.html',
                inject: 'body',
            }),
        ];

        if (process.env.NODE_ENV === 'production') {
            // When we're not in DEV mode set some vars so React knows we're in prod.
            plugins = plugins.concat([
                new webpack.DefinePlugin({<commit_msg>Remove redundant autoprefixer config (now that we have a browserlist config)<commit_after>const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');

const config = {
    entry: {
        'src/main.js': [
            'babel-polyfill',
            './src/main.js',
        ],
    },

    output: (() => {
        let output = {};

        if (process.env.NODE_ENV === 'production') {
            output = Object.assign({}, output, {
                path: path.resolve(__dirname, 'dist'),
                publicPath: '',
                filename: '[name][chunkhash].js',
            });
        } else {
            output = Object.assign({}, output, {
                path: '/',
                publicPath: 'http://localhost:3000/',
                filename: '[name]',
            });
        }

        return output;
    })(),

    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: [
                    /(node_modules)/,
                    /(packages\/react-accessible-tooltip)/,
                ],
                use: [
                    'babel-loader',
                    'eslint-loader',
                ],
            },
            {
                test: /\.scss$/,
                use: [
                    'style-loader',
                    'css-loader',
                    {
                        loader: 'postcss-loader',
                        options: {
                            plugins() {
                                return [
                                    autoprefixer,
                                    cssnano,
                                ];
                            },
                        },
                    },
                    'sass-loader',
                ],
            },
            {
                test: /\.html$/,
                loader: 'html-loader',
            },
        ],
    },

    plugins: (() => {
        // Generate a root HTML file with a <script> appended to the <body> tag.
        let plugins = [
            new HtmlWebpackPlugin({
                template: 'src/index.html',
                inject: 'body',
            }),
        ];

        if (process.env.NODE_ENV === 'production') {
            // When we're not in DEV mode set some vars so React knows we're in prod.
            plugins = plugins.concat([
                new webpack.DefinePlugin({
{'fraction_non_alphanumeric': 0.12438376943496397, 'fraction_numerical': 0.002085703450891164, 'mean_word_length': 0.8411867364746946, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2739587', 'n_tokens_mistral': 1314, 'n_tokens_neox': 1198, 'n_words': 251}