title: Controlling console.log output with Webpack 2
body: <p>I recently upgraded to Webpack 2 and now all my console.logs in the browser disappeared, as well as all redux-logger outputs, and all JavaScript errors and warnings. </p>
  
  <p>I have two configs - for dev and for test. They are virtually the same, but dev has console.logs and test doesn't. How do I enable them on test?</p>
  
  <p>Here's dev that has console.logs:</p>
  
  <pre><code>const webpack = require('webpack');
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  
  module.exports = {
    devtool: 'source-map',
  
    entry: [
      'bootstrap-loader',
      'webpack-hot-middleware/client',
      './src/index',
    ],
  
    output: {
      publicPath: '/dist/',
    },
  
    module: {
      rules: [{
        test: /\.scss$/,
        use: [
          { loader: 'style-loader' },
          { loader: 'css-loader', options: { localIdentName: '[path][name]--[local]' } },
          { loader: 'postcss-loader', options: { plugins: function () { return [ require('autoprefixer') ]; }}},
          { loader: 'sass-loader' },
        ]
      }, {
        test: /\.css$/,
        use: [
          'style-loader',
          'css-loader',
        ],
      }],
    },
  
    devServer: {
      hot: true,
      contentBase: '/dist/',
      publicPath: '/dist/'
    },
  
    plugins: [
      new webpack.DefinePlugin({
        'process.env': { NODE_ENV: '"development"' },
        __DEVELOPMENT__: true,
      }),
      new ExtractTextPlugin({ filename: 'bundle.css' }),
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NoEmitOnErrorsPlugin(),
    ],
  };
  </code></pre>
  
  <p>Here's test, that doesn't, but should: </p>
  
  <p>const webpack = require('webpack');
      const ExtractTextPlugin = require('extract-text-webpack-plugin');</p>
  
  <pre><code>module.exports = {
    devtool: 'source-map',
  
    entry: ['bootstrap-loader/extractStyles'],
  
    output: {
      publicPath: 'dist/',
    },
  
    module: {
      rules: [{
        test: /\.scss$/,
        use: [
          { loader: 'style-loader' },
          { loader: 'css-loader' },
          { loader: 'postcss-loader', options: { plugins: function () { return [ require('autoprefixer') ]; }}},
          { loader: 'sass-loader' },
        ]
      }, {
        test: /\.css$/,
        use: [
          'style-loader',
          'css-loader',
        ],
      }],
    },
  
    plugins: [
      new webpack.DefinePlugin({
        'process.env': { NODE_ENV: '"test"' },
        __DEVELOPMENT__: true,
      }),
      new ExtractTextPlugin({ filename: 'bundle.css' }),
      new webpack.optimize.UglifyJsPlugin({ sourceMap: true }),
    ],
  };
  </code></pre>
  
  <p>Suspected Uglify plugin at first, tried removing it - no result. What gives?</p>