title: magnificPopup is not working with webpack
body: <p>I have installed magnificPopup via  "npm i magnific-popup" command after that imported it in the app.js file. But in the browser console it shows (magnificPopup is not a function )</p>
  
  <p>app.js </p>
  
  <pre><code>import $ from "jQuery";
  window.$ = window.jQuery = $;
  import "magnific-popup";
  
  $(document).ready(function() {
      $('.play-btn').magnificPopup({ type: 'video' });
  
  });
  </code></pre>
  
  <p>webpack.config.js</p>
  
  <pre><code>var path = require("path");
  var webpack = require('webpack');
  
  
  module.exports = {
      entry: {
          app: "./app/assets/scripts/app.js",
          vendor: "./app/assets/scripts/vendor.js"
      },
      output: {
          path: path.resolve(__dirname, "./app/temp/scripts"),
          filename: "[name].js"
      },
      module: {
          rules: [{
                  test: /\.js$/,
                  exclude: /node_modules/,
                  use: {
                      loader: 'babel-loader',
                      options: {
                          presets: ["es2015"]
                      }
                  }
              }
  
          ]
      },
      plugins: [
          new webpack.ProvidePlugin({
              '$': 'jquery',
              'jQuery': 'jquery',
              'window.jQuery': 'jquery'
          }),
      ]
  }
  </code></pre>