Open harryxue1999 opened 7 years ago
When Hammer.js is used with AMD (RequireJS), in some cases the hammerjs module is not properly defined due to lack of String ID.
hammerjs
Current implementation: define(function () { return Hammer; });
define(function () { return Hammer; });
Suggested implementation: define('hammerjs', [], function () { return Hammer; });
define('hammerjs', [], function () { return Hammer; });
This problem causes require('hammerjs') to fail, causing some important functions (particularly with jQuery) to be undefined.
require('hammerjs')
you could
var Hammer = require(['hammerjs']);
I'll look into it though.
When Hammer.js is used with AMD (RequireJS), in some cases the
hammerjs
module is not properly defined due to lack of String ID.Current implementation:
define(function () { return Hammer; });
Suggested implementation:
define('hammerjs', [], function () { return Hammer; });
This problem causes
require('hammerjs')
to fail, causing some important functions (particularly with jQuery) to be undefined.