title: Adding Jquery to a bundle with webpack
body: <p>I'm trying to bundle my script with jQuery, which is required for it to work. It is a snippet that other webmasters must insert into their website, so I don't want it to interfere with whatever jQuery they might be running.</p>
  
  <p>I've followed the instructions as follows:</p>
  
  <pre><code>const webpack = require('webpack');
  new webpack.ProvidePlugin({
    $: 'jquery',
    jQuery: 'jquery'
  });
  const path = require('path');
  
  module.exports = (env, options) =&gt; ({
    entry: "./clickscape.js",
    output: {
      path: path.resolve(__dirname, '../priv/static/js'),
      filename: 'clickscape-bundle.js'
    }
  });
  </code></pre>
  
  <p>I also have the following package.json:</p>
  
  <pre><code>{
    "repository": {},
    "license": "MIT",
    "scripts": {
      "deploy": "webpack --mode production",
      "watch": "webpack --mode development --watch-stdin --progress --color"
    },
    "dependencies": {
      "jquery": "^3.3.1"
    },
    "devDependencies": {
      "webpack": "4.4.0",
      "webpack-cli": "^2.0.10"
    }
  }
  </code></pre>
  
  <p>It builds without errors, but jQuery isn't available for my final script. What am I doing wrong?</p>