Grunt js file > undefined is not a function

I have included hammer.js in assets/js/plugins, which is then grunt to scripts.min.js
but always result in “Uncaught TypeError: undefined is not a function”, how do i fix this?

or is it possible to exclude this file in gruntjs, and just wp_enqueue_script as a stand alone js

Have you confirmed it’s actually being compiled by searching in scripts.min.js for hammer (or whatever)?

Are you using version 7.0.0? You could use Bower to install hammer.js.

hi, thanks for your help. It’s actually my code, i was using jquery $ to reference the element, which isn’t used by hammer. Using regular js script makes it work.