title: Webpack, MD5 and VueJs
body: <p>I'm trying to use <a href="https://gist.github.com/thanashyam/2309671" rel="nofollow noreferrer">jquery.md5.js</a> 
  plugin in my VueJs project but always getting </p>
  
  <blockquote>
    <p>TypeError: (0 , _jquery.md5) is not a function</p>
  </blockquote>
  
  <p>or</p>
  
  <pre><code>ERROR in ./src/utils-convenience/jquery.md5.js
  Module build failed: SyntaxError: Unexpected token (23:2)
  21 | /*global unescape, jQuery */
  22 | export default {
  23 |   (function ($) {
     |   ^
  24 |       'use strict';
  25 | 
  26 |       /*
  </code></pre>
  
  <p>I use Webpack in my project but it's not my best part so I guess there are something wrong with files import. Please advise. </p>
  
  <p>Here is my code for both cases:</p>
  
  <pre><code> import axios from 'axios'
   import { API_URL } from '../../config/constants'
   import { md5 } from '../utils-convenience/jquery.md5'
  
   export default {
    // Getting data for main-page
     getEvents () {
      return new Promise((resolve, reject) =&gt; {
        var authId = 'api.kassy.ru'
        var secretKey = 'a619d974658f3e749b2d88b215baea46'
        var xml = '&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;request 
        module="subdivision" format="json"&gt;&lt;filter id="" db="" state="" 
        /&gt;&lt;auth id="' + authId + '" /&gt;&lt;/request&gt;'
        var sign = md5(xml + secretKey)
        axios.post(API_URL, {
          headers: {
           'Content-Type': 'application/x-www-form-urlencoded',
           'X-Requested-With': 'XMLHttpRequest'
         },
          body: {
          'xml': xml,
          'sign': sign
         }
        })
        .then((result) =&gt; {
          console.log(result)
          return resolve(result.data)
        })
         .catch(err =&gt; reject(err))
      })
    }
  </code></pre>
  
  <p>So the first error appears if I do not export code from jquery.md5.js and just import this file. The second error appears if I export code as follows:</p>
  
  <pre><code>export default {
   (function ($) {
     'use strict';
  
       ///MD5 code
  
    }(typeof jQuery === 'function' ? jQuery : this));
   }
  </code></pre>