<commit_before>const path = require('path');
const config = require('config');
const {createConfig, addPlugins, entryPoint, env, setOutput, sourceMaps, webpack} = require('@webpack-blocks/webpack2');
const WebpackMd5Hash = require('webpack-md5-hash');
const ManifestPlugin = require('webpack-manifest-plugin');
const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');
const {common, ROOT_PATH} = require('./blocks/common');
const actionCreator = require('./blocks/action-creator');
const name = require('./blocks/name');
const image = require('./blocks/image');
const babel = require('./blocks/babel');
const extractCss = require('./blocks/extract-css');
const postCss = require('./blocks/postcss');

const development = [
  entryPoint({main: [
    'react-hot-loader/patch',
    'webpack-hot-middleware/client'
  ]}),
  setOutput({
    path: path.resolve(ROOT_PATH, 'build'),
    filename: '[name].js',
    chunkFilename: '[name].js'
  }),
  babel({presets: ['react-hmre']}),
  postCss(),
  extractCss('main.css'),
  sourceMaps('eval'),
  addPlugins([new webpack.HotModuleReplacementPlugin()])
];

const production = [
  setOutput({
    path: path.resolve(ROOT_PATH, 'dist', 'web'),
    filename: '[name].[chunkhash].js',
    chunkFilename: '[name].[chunkhash].js'
  }),
  babel(),
  postCss(true),
  extractCss('[name].[chunkhash].css'),
  sourceMaps('source-map')
];

module.exports = createConfig([
  name('client'),
  common,
  setOutput({publicPath: '/'}),
  addPlugins([
    new webpack.optimize.CommonsChunkPlugin({name: 'vendors', minChunks: Infinity}),
    new WebpackMd5Hash(),
    new ManifestPlugin({fileName: 'asset-manifest.json'}),
    new ChunkManifestPlugin({
      filename: 'chunk-manifest.json',
      manifestVariable: '__WEBPACK_MANIFEST__'
    }),
    new webpack.NoEmitOnErrorsPlugin()<commit_msg>Changed to inline source maps for more accurate line numbers<commit_after>const path = require('path');
const config = require('config');
const {createConfig, addPlugins, entryPoint, env, setOutput, sourceMaps, webpack} = require('@webpack-blocks/webpack2');
const WebpackMd5Hash = require('webpack-md5-hash');
const ManifestPlugin = require('webpack-manifest-plugin');
const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');
const {common, ROOT_PATH} = require('./blocks/common');
const actionCreator = require('./blocks/action-creator');
const name = require('./blocks/name');
const image = require('./blocks/image');
const babel = require('./blocks/babel');
const extractCss = require('./blocks/extract-css');
const postCss = require('./blocks/postcss');

const development = [
  entryPoint({main: [
    'react-hot-loader/patch',
    'webpack-hot-middleware/client'
  ]}),
  setOutput({
    path: path.resolve(ROOT_PATH, 'build'),
    filename: '[name].js',
    chunkFilename: '[name].js'
  }),
  babel({presets: ['react-hmre']}),
  postCss(),
  extractCss('main.css'),
  sourceMaps('inline-source-map'),
  addPlugins([new webpack.HotModuleReplacementPlugin()])
];

const production = [
  setOutput({
    path: path.resolve(ROOT_PATH, 'dist', 'web'),
    filename: '[name].[chunkhash].js',
    chunkFilename: '[name].[chunkhash].js'
  }),
  babel(),
  postCss(true),
  extractCss('[name].[chunkhash].css'),
  sourceMaps('source-map')
];

module.exports = createConfig([
  name('client'),
  common,
  setOutput({publicPath: '/'}),
  addPlugins([
    new webpack.optimize.CommonsChunkPlugin({name: 'vendors', minChunks: Infinity}),
    new WebpackMd5Hash(),
    new ManifestPlugin({fileName: 'asset-manifest.json'}),
    new ChunkManifestPlugin({
      filename: 'chunk-manifest.json',
      manifestVariable: '__WEBPACK_MANIFEST__'
    }),
    new webpack.NoEmitOnErrorsPlugin()
{'fraction_non_alphanumeric': 0.17757510729613735, 'fraction_numerical': 0.002145922746781116, 'mean_word_length': 5.0931372549019605, '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': '6477218', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1169, 'n_words': 218}