<commit_before>const path = require('path');
const webpack = require('webpack');
const AssetsPlugin = require('assets-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const vars = require('postcss-simple-vars');
const autoprefixer = require('autoprefixer');

const { conf } = require('../src/server/helpers/config');
const WEBPACK_DEV_URL = conf.get('WEBPACK_DEV_URL');
const sharedVars = require('../src/common/style/variables');

module.exports = {
  context: path.resolve(__dirname, '..'),
  entry: [
    'babel-polyfill',
    `webpack-hot-middleware/client?path=${WEBPACK_DEV_URL}/__webpack_hmr`,
    'webpack/hot/only-dev-server',
    'react-hot-loader/patch',
    './src/common',
  ],
  output: {
    path: path.join(__dirname, '../public/static'),
    filename: 'bundle.js',
    sourceMapFilename: '[file].map',
    publicPath: `${WEBPACK_DEV_URL}/static/`
  },
  plugins: [
    new webpack.optimize.OccurrenceOrderPlugin(),
    new webpack.HotModuleReplacementPlugin(),
    new ExtractTextPlugin('style.css', { allChunks: true }),
    new AssetsPlugin()
  ],
  module: {
    // https://github.com/localForage/localForage/issues/577
    noParse: /node_modules\/localforage\/dist\/localforage\.js$/,
    loaders: require('./loaders-config.js')
  },
  devtool: 'source-map',
  postcss: function () {
    return [ vars({ variables: () => sharedVars }), autoprefixer ];
  },
  debug: true
};<commit_msg>Explicitly inject NODE_ENV=development in webpack (#124)<commit_after>const path = require('path');
const webpack = require('webpack');
const AssetsPlugin = require('assets-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const vars = require('postcss-simple-vars');
const autoprefixer = require('autoprefixer');

const { conf } = require('../src/server/helpers/config');
const WEBPACK_DEV_URL = conf.get('WEBPACK_DEV_URL');
const sharedVars = require('../src/common/style/variables');

module.exports = {
  context: path.resolve(__dirname, '..'),
  entry: [
    'babel-polyfill',
    `webpack-hot-middleware/client?path=${WEBPACK_DEV_URL}/__webpack_hmr`,
    'webpack/hot/only-dev-server',
    'react-hot-loader/patch',
    './src/common',
  ],
  output: {
    path: path.join(__dirname, '../public/static'),
    filename: 'bundle.js',
    sourceMapFilename: '[file].map',
    publicPath: `${WEBPACK_DEV_URL}/static/`
  },
  plugins: [
    new webpack.optimize.OccurrenceOrderPlugin(),
    new webpack.HotModuleReplacementPlugin(),
    new ExtractTextPlugin('style.css', { allChunks: true }),
    new AssetsPlugin(),
    new webpack.DefinePlugin({
      'process.env': {
        'NODE_ENV': JSON.stringify('development')
      }
    })
  ],
  module: {
    // https://github.com/localForage/localForage/issues/577
    noParse: /node_modules\/localforage\/dist\/localforage\.js$/,
    loaders: require('./loaders-config.js')
  },
  devtool: 'source-map',
  postcss: function () {
    return [ vars({ variables: () => sharedVars }), autoprefixer ];
  },
  debug: true
};
{'fraction_non_alphanumeric': 0.17536945812807883, 'fraction_numerical': 0.002955665024630542, 'mean_word_length': 4.051409618573798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1319806', 'n_tokens_mistral': 982, 'n_tokens_neox': 996, 'n_words': 158}