<commit_before>var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackFailPlugin = require('webpack-fail-plugin');
var ProgressBarPlugin = require('progress-bar-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');

const NODE_ENV = process.env.NODE_ENV || 'development';


var jsonFN = require('json-fn');


const dotenv = require('dotenv');

const webpack = require('webpack');
const path = require('path');

const join = path.join;
const resolve = path.resolve;

const isDev = NODE_ENV === 'development';
const isTest = NODE_ENV === 'test';

// devServer config
const devHost = process.env.HOST || 'localhost';
const devPort = process.env.PORT || 3000;

const setPublicPath = process.env.SET_PUBLIC_PATH !== 'false';
const publicPath = (isDev && setPublicPath) ? `//${devHost}:${devPort}/` : '';

const root = resolve(__dirname);
const src = join(root, 'src');
const modules = join(root, 'node_modules');
const dest = join(root, 'dist');
const css = join(src, 'styles');

const fontPath = 'reactapp/[hash].[ext]';
const imgPath = 'reactapp/images/[hash].[ext]';

var routeComponentRegex = /routes\/([^\/]+\/?[^\/]+).js$/;

var config = {

    'entry': [
        `${path.join(src, 'appBootstrapper.jsx')}`,
        `babel-polyfill`
    ],
    'output': {
        path: './dist/',
        filename: 'reactapp/[name].app.js',
        chunkFilename: 'reactapp/[name].chunk.js',
        cssFilename: 'reactapp/app.css',
        hash: false,
        publicPath: '/',
    },

    'resolve': {
        'extensions': [
            '',
            '.js',
            '.jsx',
            '.json',
            '.ts',
            '.tsx',
        ]
    },

    plugins: [
        new HtmlWebpackPlugin({cache: false, template: 'my-index.ejs'}),
        new webpack.optimize.DedupePlugin(),
        WebpackFailPlugin,
        new ProgressBarPlugin(),
        new webpack.DllReferencePlugin({
            context: '.',
            manifest: require('./common-dist/common-manifest.json')
        }),
        new CopyWebpackPlugin([
            { from: './common-dist', to: 'reactapp' },
            { from: './src/globalStyles/prefixed-bootstrap.min.css', to:'reactapp/prefixed-bootstrap.min.css' },
            { from: './src/globalStyles/prefixed-bootstrap.min.css.map', to:'reactapp/prefixed-bootstrap.min.css.map' }
        ]) // destination is relative to dist directory<commit_msg>Allow deployment in subfolder<commit_after>var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackFailPlugin = require('webpack-fail-plugin');
var ProgressBarPlugin = require('progress-bar-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');

const NODE_ENV = process.env.NODE_ENV || 'development';


var jsonFN = require('json-fn');


const dotenv = require('dotenv');

const webpack = require('webpack');
const path = require('path');

const join = path.join;
const resolve = path.resolve;

const isDev = NODE_ENV === 'development';
const isTest = NODE_ENV === 'test';

// devServer config
const devHost = process.env.HOST || 'localhost';
const devPort = process.env.PORT || 3000;

const setPublicPath = process.env.SET_PUBLIC_PATH !== 'false';
const publicPath = (isDev && setPublicPath) ? `//${devHost}:${devPort}/` : '';

const root = resolve(__dirname);
const src = join(root, 'src');
const modules = join(root, 'node_modules');
const dest = join(root, 'dist');
const css = join(src, 'styles');

const fontPath = 'reactapp/[hash].[ext]';
const imgPath = 'reactapp/images/[hash].[ext]';

var routeComponentRegex = /routes\/([^\/]+\/?[^\/]+).js$/;

var config = {

    'entry': [
        `${path.join(src, 'appBootstrapper.jsx')}`,
        `babel-polyfill`
    ],
    'output': {
        path: './dist/',
        filename: 'reactapp/[name].app.js',
        chunkFilename: 'reactapp/[name].chunk.js',
        cssFilename: 'reactapp/app.css',
        hash: false,
        publicPath: '',
    },

    'resolve': {
        'extensions': [
            '',
            '.js',
            '.jsx',
            '.json',
            '.ts',
            '.tsx',
        ]
    },

    plugins: [
        new HtmlWebpackPlugin({cache: false, template: 'my-index.ejs'}),
        new webpack.optimize.DedupePlugin(),
        WebpackFailPlugin,
        new ProgressBarPlugin(),
        new webpack.DllReferencePlugin({
            context: '.',
            manifest: require('./common-dist/common-manifest.json')
        }),
        new CopyWebpackPlugin([
            { from: './common-dist', to: 'reactapp' },
            { from: './src/globalStyles/prefixed-bootstrap.min.css', to:'reactapp/prefixed-bootstrap.min.css' },
            { from: './src/globalStyles/prefixed-bootstrap.min.css.map', to:'reactapp/prefixed-bootstrap.min.css.map' }
        ]) // destination is relative to dist directory
{'fraction_non_alphanumeric': 0.1742378356551585, 'fraction_numerical': 0.0016151827175449223, 'mean_word_length': 2.885490196078431, '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': '3259869', 'n_tokens_mistral': 1540, 'n_tokens_neox': 1507, 'n_words': 304}