title: Webpack Provide Plugin for global use of Underscore - Error
body: <p>I am trying to use Underscore globally via Webpack ProvidePlugin, however it is not recognising Underscore, and in the console I get the following error.  </p>
  
  <pre><code>VM43994:1 Uncaught ReferenceError: _ is not defined(…)
  </code></pre>
  
  <p>I am importing Underscore in my index.js (perhaps this is not needed now I am using a vendor bundle?), and my webpack config is as below.  At one stage I thought I had it working (before doing the vendor bundle), however I now think I may have been mistaken, as I feel I have tried all the avenues that I tried before.</p>
  
  <pre><code>const webpack = require('webpack');
  const path = require('path');
  const precss = require('precss');
  const autoprefixer = require('autoprefixer');
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  const postcssImport = require('postcss-import');
  
  module.exports = {
  
    context: __dirname + '/frontend',
    devtool: 'source-map',
    entry: {
      app: './index.js',
      vendor: ['underscore'],
    },
    output: {
      filename: 'bundle.js',
      path: path.join(__dirname, './static'),
    },
    module: {
      loaders: [
      { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'] } },
      { test: /\.css$/, loader: ExtractTextPlugin.extract('style', 'css?sourceMap&amp;importLoaders=1!postcss') },
      ],
    },
    plugins: [
      new ExtractTextPlugin('si-styles.css'),
      new webpack.ProvidePlugin({ underscore: 'underscore' }),
      new webpack.optimize.CommonsChunkPlugin(/* chunkName= */'vendor', /* filename= */'vendor.bundle.js', Infinity),
    ],
    postcss: function(webpack) {
      return [
        postcssImport({ addDependencyTo: webpack }), // Must be first item in list
        precss,
        autoprefixer({ browsers: ['last 2 versions'] }),
      ];
    },
  
  };
  </code></pre>