title: Using jquery-mobile with Webpack
body: <p>I am trying to load jquery-mobile using webpack with no luck so far.
  I am aware that jquery-mobile depends on jquery-ui which in turn depends on jquery.</p>
  
  <p>How do I set up such a scenario in Webpack?</p>
  
  <p>Here is my <code>webpack.config.js</code>:</p>
  
  <pre><code>var webpack = require('webpack');
  var path = require('path');
  var bower_dir = __dirname + '/bower_components';
  
  module.exports = {
  
      context: __dirname,
      entry: './assets/js/index.js',         
      output: {
          path: path.resolve('./assets/bundles/'),
          filename: "[name]-[hash].js",
      },
      plugins: [
          new BundleTracker({filename: './webpack-stats.json'}),
          new webpack.ProvidePlugin({
              $: 'jquery',
              jQuery: 'jquery',
              'window.jQuery': 'jquery'
          })
      ],
      module: {
          loaders: [
              {test: /[\/\\]node_modules[\/\\]some-module[\/\\]index\.js$/, loader: "imports?this=&gt;window"}
          ]
      },
      resolve: {
          alias: {
              'jquery': bower_dir + '/jquery/src/jquery.js',
              'jquery-ui': bower_dir + '/jquery-ui/jquery-ui.js',
              'jquery-mobile': bower_dir + '/jquery-mobile/js/jquery.mobile.js'
          }
      }
  };
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thank you all in advance.</p>