Closed
Description
openedon Jul 31, 2017
I've hit problems with a few libraries which use UMD wrappers which Closure doesn't detect:
Leaflet https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/leaflet-src.js:
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.L = global.L || {})));
}(this, (function (exports) {
exports.foo = "bar";
})));
Bowser https://github.com/lancedikson/bowser/blob/master/src/bowser.js:
!function (root, name, definition) {
if (typeof module != 'undefined' && module.exports) module.exports = definition()
else if (typeof define == 'function' && define.amd) define(name, definition)
else root[name] = definition()
}(this, 'bowser', function () {
return {foo: 'bar'};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment