title: webpack - Module not found: Error: Can't resolve 'jquery'
body: <p>I'm using Sails 1 with webpack and when I attempt to import jquery from my main js file, I get this error yelling that it can't resolve jquery.</p>
  
  <p><strong>webpack.config.js:</strong></p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  var ExtractTextPlugin = require('extract-text-webpack-plugin');
  var CleanWebpackPlugin = require('clean-webpack-plugin');
  var CopyWebpackPlugin = require('copy-webpack-plugin');
  
  module.exports.webpack = {
  
      devtool: 'source-map',
      entry: {
          'admin': './assets/admin/js/admin.js'
      },
      output: {
          filename: 'js/[name].bundle.js',
          path: path.resolve(__dirname, '..', '.tmp', 'public')
      },
      resolve: {
          modules: [
              path.join(__dirname, "js"), "node_modules"
          ]
      },
      module: {
          // Extract less files
          rules: [{
              test: /\.css$/,
              loader: ExtractTextPlugin.extract({ use: 'css-loader' })
          }, {
              test: /\.less$/,
              loader: ExtractTextPlugin.extract({ use: 'css-loader!less-loader' })
          }, {
              test: /\.js$/,
              exclude: /node_modules/,
              loader: 'babel-loader',
              options: { 
                  presets: [ 
                      [ 'es2015', { modules: false } ] 
                  ] 
              }
          }]
      },
      plugins: [
  
          new webpack.ProvidePlugin({
              $: 'jquery',
              jQuery: 'jquery'
          }),
          // This plugin extracts CSS that was imported into .js files, and bundles
          // it into separate .css files.  The filename is based on the name of the
          // .js file that the CSS was imported into.
          new ExtractTextPlugin('css/[name].bundle.css'),
  
          // This plugin cleans out your .tmp/public folder before lifting.
          new CleanWebpackPlugin(['public'], {
              root: path.resolve(__dirname, '..', '.tmp'),
              verbose: true,
              dry: false
          }),
  
          // This plugin copies the `images` and `fonts` folders into
          // the .tmp/public folder.  You can add any other static asset
          // folders to this list and they'll be copied as well.
          new CopyWebpackPlugin([{
              from: './assets/images',
              to: path.resolve(__dirname, '..', '.tmp', 'public', 'images')
          }])
      ]
  };
  </code></pre>
  
  <p>and in my assets/admin/js/admin.js I only have </p>
  
  <pre><code>import 'jquery';
  </code></pre>
  
  <p>jquery is on my package json and it shows up under my node_modules packages with the name <em>jquery</em>.</p>
  
  <p>Another weird thing is that if I change jquery and attempt to import <strong>angular</strong>, it <strong>works</strong> perfectly, so I don't think it's a node_modules directory issue or something like that.</p>