A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/naver/hammer.js/issues/11 below:

Change the priority of define and exports. · Issue #11 · naver/hammer.js · GitHub

When using a UMD-supporting module, there is a possibility that the module does not operate normally depending on the object return order and global environment.

  1. Bundle the release js file with commonjs method via webpack.
  2. amd expressions take precedence in certain 'umd support modules'.
if (typeof define === 'function' && define.amd) {
    define(function() {
        return Hammer;
    });
} else if (typeof module != 'undefined' && module.exports) {
    module.exports = Hammer;
} else {
    window[exportName] = Hammer;
}
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (global.Hammer = factory());
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4