title: webpack jquery plugin perfect-tooltip
body: <p>I'm trying to load the perfect-tooltip jquery plugin (<a href="http://tborychowski.github.io/perfecttooltip/" rel="nofollow noreferrer">http://tborychowski.github.io/perfecttooltip/</a>) using webpack.
  I successfully loaded other jquery plugins like: typed.js and backstretch by following the instructions provided here (<a href="https://stackoverflow.com/questions/28969861/managing-jquery-plugin-dependency-in-webpack">Managing jQuery plugin dependency in webpack</a>) but they don't seem to work with that specific plugin.</p>
  
  <p>When I run the bundle an error tells me that the tooltip function (exported by the plugin) is not defined. It seems the plugin is not loaded by jquery. I thought the plugin tried to load its own instance of jquery so I used an alias:</p>
  
  <pre><code>alias: {
    'jquery': require('jquery'),
  }
  </code></pre>
  
  <p>It didn't solve the problem.</p>
  
  <p>My current webpack configuration:</p>
  
  <pre><code>var webpack = require('webpack');
  var HtmlWebpackPlugin = require('html-webpack-plugin');
  var CleanWebpackPlugin = require('clean-webpack-plugin');
  var CopyWebpackPlugin = require('copy-webpack-plugin');
  var ExtractTextPlugin = require('extract-text-webpack-plugin');
  var moment = require('moment');
  var path = require('path');
  var environment = process.env.APP_ENVIRONMENT || 'dev';
  
  module.exports = {
  
    entry: {
      'app': './src/main.ts',
      'polyfills': './src/polyfills.ts',
      'vendor': './src/vendor.ts'
    },
    devtool: 'source-map',
    output: {
      path: './dist',
      filename: '[name].browser.' + moment().format('DDMMYYYYHHmm') + '.js'
    },
    module: {
      loaders: [
        { test: /\.component.ts$/, loader: 'ts!angular2-template' },
        { test: /\.ts$/, exclude: /\.component.ts$/, loader: 'ts' },
        { test: /\.html$/, loader: 'raw-loader' },
        { test: /\.css$/, include: path.resolve('src/app'), loader: 'raw-loader' },
        {
          test: /\.css$/, exclude: path.resolve('src/app'), loader: ExtractTextPlugin.extract('style', 'css', {
            fallbackLoader: "style-loader",
            loader: "css-loader"
          })
        },
        { test: /\.(png|jpe?g|gif|ico)$/, loader: 'file?name=fonts/[name].[ext]' },
        { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&amp;mimetype=application/font-woff&amp;name=fonts/[name].[ext]" },
        { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&amp;mimetype=application/font-woff&amp;name=fonts/[name].[ext]" },
        { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&amp;mimetype=application/octet-stream&amp;name=fonts/[name].[ext]" },
        { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file?name=fonts/[name].[ext]" },
        { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&amp;mimetype=image/svg+xml&amp;name=fonts/[name].[ext]" },
      ]
    },
    resolve: {
      extensions: ['', '.js', '.ts', '.html', '.css']
    },
    plugins: [
      new webpack.optimize.CommonsChunkPlugin({
        name: ['vendor', 'polyfills']
      }),
      new HtmlWebpackPlugin({
        template: './src/index.html'
      }),
      new webpack.DefinePlugin({
        app: {
          environment: JSON.stringify(environment),
          config: JSON.stringify(require('./profile/' + environment + ".profile.js"))
        }
      }),
      new CleanWebpackPlugin(
        ['dist']
      ),
      new CopyWebpackPlugin([
        { from: './src/images', to: 'images' }
      ]),
      new ExtractTextPlugin('[name].browser.css'),
      new webpack.optimize.UglifyJsPlugin({ minimize: true }),
      new webpack.ProvidePlugin({
        $: "jquery",
        jQuery: "jquery",
        "window.jQuery": "jquery"
      })
    ]
  };
  </code></pre>
  
  <p>Any insight?</p>